From 369046bbb45a05625919d07691986b06f7564d31 Mon Sep 17 00:00:00 2001 From: darkrose Date: Sun, 15 Jul 2012 16:50:42 +1000 Subject: [PATCH] Check for table type when reading groups from Lua --- src/scriptapi.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 &result) { + if (!lua_istable(L,index)) + return; result.clear(); lua_pushnil(L); if(index < 0)