fix crash when doing Textbox.new()
This commit is contained in:
parent
6040ccd27e
commit
51eeaf218d
@ -122,6 +122,8 @@ private:
|
|||||||
// push onto the Lua stack a userdata containing a pointer to T object
|
// push onto the Lua stack a userdata containing a pointer to T object
|
||||||
static int new_T(lua_State * L)
|
static int new_T(lua_State * L)
|
||||||
{
|
{
|
||||||
|
if (!lua_gettop(L))
|
||||||
|
return 0;
|
||||||
lua_remove(L, 1); // use classname:new(), instead of classname.new()
|
lua_remove(L, 1); // use classname:new(), instead of classname.new()
|
||||||
|
|
||||||
T *obj = new T(L); // call constructor for T objects
|
T *obj = new T(L); // call constructor for T objects
|
||||||
|
Reference in New Issue
Block a user