aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/wslua/wslua_tree.c')
-rw-r--r--epan/wslua/wslua_tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/wslua/wslua_tree.c b/epan/wslua/wslua_tree.c
index 1ca9794a55..716efec384 100644
--- a/epan/wslua/wslua_tree.c
+++ b/epan/wslua/wslua_tree.c
@@ -324,6 +324,8 @@ static int TreeItem_add_item_any(lua_State *L, gboolean little_endian) {
hfid = proto->hfid;
type = FT_PROTOCOL;
ett = proto->ett;
+ } else if (lua_isnil(L, 1)) {
+ return luaL_error(L, "first argument to TreeItem:add is nil!");
}
} else {
hfid = field->hfid;