fix crash when doing Textbox.new()

This commit is contained in:
jacob1 2017-02-13 17:43:48 -05:00
parent 6040ccd27e
commit 51eeaf218d

View File

@ -122,6 +122,8 @@ private:
// push onto the Lua stack a userdata containing a pointer to T object
static int new_T(lua_State * L)
{
if (!lua_gettop(L))
return 0;
lua_remove(L, 1); // use classname:new(), instead of classname.new()
T *obj = new T(L); // call constructor for T objects