Permalink
Browse files

fix crash when doing Textbox.new()

  • Loading branch information...
jacob1 committed Feb 13, 2017
1 parent 6040ccd commit 51eeaf218d48c8dcfb8270b8de5110d1caf2e32c
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/lua/LuaLuna.h
@@ -122,6 +122,8 @@ template <typename T> class Luna
// 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

0 comments on commit 51eeaf2

Please sign in to comment.