From 2cb49b6d8a005832dceeb41112011707f34794a5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 19 Mar 2017 11:08:09 +0000 Subject: [PATCH] [Minor] Add workaround for learn condition when no symbols defined Issue: #1536 --- src/libstat/stat_process.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.5