Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ static void obj_delete_cb(lv_event_t *e)
lua_pushnil(L);
lua_setuservalue(L, -2);
#else
lua_pushglobaltable(L);
lua_setuservalue(L, -2);
lua_getuservalue(L, -1);
lua_pushnil(L);
lua_rawseti(L, -2, 1);
lua_pop(L, 1);
#endif

luavgl_obj_t *lobj = luavgl_to_lobj(L, -1);
Expand Down Expand Up @@ -876,7 +878,7 @@ static int obj_property_user_data(lua_State *L, lv_obj_t *obj, bool set)
#else
if (set) {
lua_getuservalue(L, 1);
lua_pushvalue(L, -1);
lua_pushvalue(L, -2);
lua_rawseti(L, -2, 1);
} else {
lua_getuservalue(L, 1);
Expand Down