lua-utils: fix mrp_lua_create_object() to handle correctly names
authorJanos Kovacs <jankovac503@gmail.com>
Mon, 12 Nov 2012 13:57:51 +0000 (15:57 +0200)
committerJanos Kovacs <jankovac503@gmail.com>
Mon, 12 Nov 2012 13:57:51 +0000 (15:57 +0200)
src/core/lua-utils/object.c

index 5f5c353..673f571 100644 (file)
@@ -121,7 +121,7 @@ void *mrp_lua_create_object(lua_State          *L,
         if (!valid_id(name))
             return NULL;
 
-        lua_getglobal(L, def->constructor);
+        mrp_lua_get_class_table(L, def);
         luaL_checktype(L, -1, LUA_TTABLE);
         class = lua_gettop(L);
     }