mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 16:39:41 +00:00
Fix a crash when exiting OpenMW while the mouse cursor is over a local map marker
This commit is contained in:
parent
d86585b153
commit
5163358478
1 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,13 @@ namespace MWGui
|
|||
|
||||
LocalMapBase::~LocalMapBase()
|
||||
{
|
||||
// Clear our "lost focus" delegate for marker widgets first, otherwise it will
|
||||
// fire when the widget is about to be destroyed and the mouse cursor is over it.
|
||||
// At that point, other widgets may already be destroyed, so applyFogOfWar (which is called by the delegate) would crash.
|
||||
for (std::vector<MyGUI::Widget*>::iterator it = mDoorMarkerWidgets.begin(); it != mDoorMarkerWidgets.end(); ++it)
|
||||
(*it)->eventMouseLostFocus.clear();
|
||||
for (std::vector<MyGUI::Widget*>::iterator it = mMarkerWidgets.begin(); it != mMarkerWidgets.end(); ++it)
|
||||
(*it)->eventMouseLostFocus.clear();
|
||||
}
|
||||
|
||||
void LocalMapBase::init(MyGUI::ScrollView* widget, MyGUI::ImageBox* compass, OEngine::GUI::Layout* layout, bool mapDragAndDrop)
|
||||
|
|
Loading…
Reference in a new issue