diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-19 11:08:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-19 11:08:09 +0000 |
commit | 2cb49b6d8a005832dceeb41112011707f34794a5 (patch) | |
tree | 5191dbc58288518158c5879ae58c8271396365ce | |
parent | f20a17627041adf5dd79e441f372129296a13aa2 (diff) | |
download | rspamd-2cb49b6d8a005832dceeb41112011707f34794a5.tar.gz rspamd-2cb49b6d8a005832dceeb41112011707f34794a5.zip |
[Minor] Add workaround for learn condition when no symbols defined
Issue: #1536
-rw-r--r-- | src/libstat/stat_process.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index a1269664d..8d9717562 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -958,6 +958,10 @@ rspamd_stat_has_classifier_symbols (struct rspamd_task *task, struct rspamd_stat_ctx *st_ctx; gboolean is_spam; + if (mres == NULL) { + return FALSE; + } + st_ctx = rspamd_stat_get_ctx (); is_spam = !!(task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM); |