Skip to content

Commit

Permalink
FIX(windowmanagerimp): Don't remove a ui mode twice
Browse files Browse the repository at this point in the history
  • Loading branch information
magicaldave committed Sep 11, 2024
1 parent 6b762a5 commit 2ea9d6b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/openmw/mwgui/windowmanagerimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,9 +1323,12 @@ namespace MWGui
window->exit();
}
mKeyboardNavigation->saveFocus(mode);
mGuiModes.pop_back();
mGuiModeStates[mode].update(false);
MWBase::Environment::get().getLuaManager()->uiModeChanged(MWWorld::Ptr());
if (containsMode(mode))
{
mGuiModes.pop_back();
mGuiModeStates[mode].update(false);
MWBase::Environment::get().getLuaManager()->uiModeChanged(MWWorld::Ptr());
}
}

if (!mGuiModes.empty())
Expand Down

0 comments on commit 2ea9d6b

Please sign in to comment.