aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua
diff options
context:
space:
mode:
Diffstat (limited to 'epan/wslua')
-rw-r--r--epan/wslua/wslua.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/wslua/wslua.h b/epan/wslua/wslua.h
index d13b1fb56f..b593b7ed3b 100644
--- a/epan/wslua/wslua.h
+++ b/epan/wslua/wslua.h
@@ -259,7 +259,7 @@ typedef struct _wslua_private_table* PrivateTable;
C to##C(lua_State* L, int idx) { \
C* v = (C*)lua_touserdata (L, idx); \
if (!v) luaL_typerror(L,idx,#C); \
- return *v; \
+ return v ? *v : NULL; \
} \
C check##C(lua_State* L, int idx) { \
C* p; \