commit 6581dc0: [Minor] Fix learning with symbols that have no static scores

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Mar 18 10:49:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-03-18 10:42:23 +0000
URL: https://github.com/rspamd/rspamd/commit/6581dc09e6ca1e8114430b9c921012c885959384 (HEAD -> master)

[Minor] Fix learning with symbols that have no static scores

---
 src/lua/lua_task.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 1fbf988a9..4a6040145 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -4791,7 +4791,7 @@ lua_task_process_ann_tokens (lua_State *L)
 
 					gdouble norm_score;
 
-					if (!isnan (sres->sym->score)) {
+					if (sres->sym && !isnan (sres->sym->score)) {
 						if (sres->sym->score == 0) {
 
 							if (sres->score == 0) {


More information about the Commits mailing list