summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_classifier.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_classifier.c')
-rw-r--r--src/lua/lua_classifier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_classifier.c b/src/lua/lua_classifier.c
index 4e868b7f7..82fd4948d 100644
--- a/src/lua/lua_classifier.c
+++ b/src/lua/lua_classifier.c
@@ -72,7 +72,7 @@ lua_check_classifier (lua_State * L)
{
void *ud = luaL_checkudata (L, 1, "rspamd{classifier}");
luaL_argcheck (L, ud != NULL, 1, "'classifier' expected");
- return *((struct classifier_config **)ud);
+ return ud ? *((struct classifier_config **)ud) : NULL;
}
static GList *
@@ -353,7 +353,7 @@ lua_check_statfile (lua_State * L)
{
void *ud = luaL_checkudata (L, 1, "rspamd{statfile}");
luaL_argcheck (L, ud != NULL, 1, "'statfile' expected");
- return *((struct statfile **)ud);
+ return ud ? *((struct statfile **)ud) : NULL;
}