From 51ec417dbc9ea2f4b0b1cec4df8f6c339c94d974 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Thu, 20 Sep 2018 18:04:04 +0430 Subject: fix --- luatablegen.py | 1 + 1 file changed, 1 insertion(+) diff --git a/luatablegen.py b/luatablegen.py index ee2d4d0..244a8d6 100755 --- a/luatablegen.py +++ b/luatablegen.py @@ -515,6 +515,7 @@ class TbgParser(object): def push_args(self, c_source, struct_name, field_names, lua_types): dummy = str() c_source.write(PUSH_ARGS[0].replace("XXX", struct_name)) + c_source.write("if (_st == NULL) return 0;\n") c_source.write("\tlua_checkstack(__ls, " + repr(len(field_names)) + ");\n") for field_name, lua_type in zip(field_names, lua_types): if lua_type == "integer": dummy = "\tlua_pushinteger(__ls, _st->"+field_name+");\n" -- cgit v1.2.3