From 96fea560db92cebad8837e1721b4c3ca147974cd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 7 Sep 2018 22:40:33 +0100 Subject: [PATCH] [Minor] Check language detector prior to usage --- src/libmime/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libmime/message.c b/src/libmime/message.c index 2a0981ecdd..70a08a06ff 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -223,7 +223,7 @@ rspamd_mime_part_detect_language (struct rspamd_task *task, { struct rspamd_lang_detector_res *lang; - if (part->utf_words) { + if (part->utf_words && task->lang_det) { if (rspamd_language_detector_detect (task, task->lang_det, part)) { lang = g_ptr_array_index (part->languages, 0); part->language = lang->lang; -- 2.47.3