mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 10:39:41 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue