aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-09-07 22:40:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-09-07 22:40:33 +0100
commit96fea560db92cebad8837e1721b4c3ca147974cd (patch)
tree52b7080fbe9c69ec65b4469cfd4ffe2a78c4b554 /src/libmime
parent740a4a0f78ea2d80300908cd7dbbd040ac5d5f56 (diff)
downloadrspamd-96fea560db92cebad8837e1721b4c3ca147974cd.tar.gz
rspamd-96fea560db92cebad8837e1721b4c3ca147974cd.zip
[Minor] Check language detector prior to usage
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 2a0981ecd..70a08a06f 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;