mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 19:20:49 +00:00
Merge branch 'fix_element_destroy' into 'master'
Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup See merge request OpenMW/openmw!3033
This commit is contained in:
commit
364bc91f5b
@ -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…
x
Reference in New Issue
Block a user