aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_dns_resolver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c
index 8a49fdfaf..d00aaa6a2 100644
--- a/src/lua/lua_dns_resolver.c
+++ b/src/lua/lua_dns_resolver.c
@@ -455,7 +455,10 @@ lua_dns_resolver_resolve_common (lua_State *L,
if (ret) {
cbdata->s = session;
cbdata->item = rspamd_symbols_cache_get_cur_item (task);
- rspamd_symcache_item_async_inc (task, cbdata->item);
+
+ if (cbdata->item) {
+ rspamd_symcache_item_async_inc (task, cbdata->item);
+ }
/* callback was set up */
lua_pushboolean (L, TRUE);
} else {