aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstat/learn_cache/redis_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c
index a76ad585c..0df3783ab 100644
--- a/src/libstat/learn_cache/redis_cache.c
+++ b/src/libstat/learn_cache/redis_cache.c
@@ -470,7 +470,7 @@ rspamd_stat_cache_redis_learn (struct rspamd_task *task,
gchar *h;
gint flag;
- if (rspamd_session_blocked (task->s)) {
+ if (rt == NULL || rt->ctx == NULL || rspamd_session_blocked (task->s)) {
return RSPAMD_LEARN_INGORE;
}