aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r--src/lua/lua_regexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c
index ee8579dec..7a0b3d0c3 100644
--- a/src/lua/lua_regexp.c
+++ b/src/lua/lua_regexp.c
@@ -53,7 +53,7 @@ lua_check_regexp (lua_State * L)
void *ud = luaL_checkudata (L, 1, "rspamd{regexp}");
luaL_argcheck (L, ud != NULL, 1, "'regexp' expected");
- return *((GRegex **)ud);
+ return ud ? *((GRegex **)ud) : NULL;
}
static int