Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup

simplify_debugging
Petr Mikheev 2 years ago
parent 5f6ca2a6d1
commit c6eed2a6c6

@ -216,12 +216,12 @@ namespace LuaUi
void Element::destroy()
{
sAllElements.erase(this);
if (!mRoot)
return;
destroyWidget(mRoot);
mRoot = nullptr;
mLayout = sol::make_object(mLayout.lua_state(), sol::nil);
sAllElements.erase(this);
}
void Element::attachToWidget(WidgetExtension* w)

Loading…
Cancel
Save