1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Fix a crash when exiting OpenMW while the mouse cursor is over a local map marker

This commit is contained in:
scrawl 2014-05-10 01:14:12 +02:00
parent d86585b153
commit 5163358478

View File

@ -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)