diff options
-rw-r--r-- | src/scriptapi.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 4b3fbe296..39e89ddb5 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -686,6 +686,8 @@ static NodeBox read_nodebox(lua_State *L, int index) static void read_groups(lua_State *L, int index, std::map<std::string, int> &result) { + if (!lua_istable(L,index)) + return; result.clear(); lua_pushnil(L); if(index < 0) |