diff options
Diffstat (limited to 'src/libstat/tokenizers/tokenizers.c')
-rw-r--r-- | src/libstat/tokenizers/tokenizers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/tokenizers/tokenizers.c b/src/libstat/tokenizers/tokenizers.c index 9ec0c4315..604fc070e 100644 --- a/src/libstat/tokenizers/tokenizers.c +++ b/src/libstat/tokenizers/tokenizers.c @@ -771,8 +771,8 @@ rspamd_stem_words (GArray *words, rspamd_mempool_t *pool, tok->stemmed.begin = tok->normalized.begin; } - if (tok->stemmed.len > 0 && rspamd_language_detector_is_stop_word (d, - tok->stemmed.begin, tok->stemmed.len)) { + if (tok->stemmed.len > 0 && d != NULL && + rspamd_language_detector_is_stop_word (d, tok->stemmed.begin, tok->stemmed.len)) { tok->flags |= RSPAMD_STAT_TOKEN_FLAG_STOP_WORD; } } |