forked from mirror/openmw-tes3mp
Fix crash when exiting OpenMW while dialogue/journal is opened and mouse cursor on a topic
(Fixes #1300)
This commit is contained in:
parent
5163358478
commit
242e19a136
1 changed files with 4 additions and 1 deletions
|
@ -783,7 +783,8 @@ public:
|
||||||
|
|
||||||
ActiveTextFormats::iterator i = mActiveTextFormats.find (Font);
|
ActiveTextFormats::iterator i = mActiveTextFormats.find (Font);
|
||||||
|
|
||||||
mNode->outOfDate (i->second->mRenderItem);
|
if (mNode)
|
||||||
|
mNode->outOfDate (i->second->mRenderItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1125,6 +1126,8 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void onMouseLostFocus(Widget* _new)
|
void onMouseLostFocus(Widget* _new)
|
||||||
{
|
{
|
||||||
|
// NOTE: MyGUI also fires eventMouseLostFocus for widgets that are about to be destroyed (if they had focus).
|
||||||
|
// Child widgets may already be destroyed! So be careful.
|
||||||
if (PageDisplay* pd = dynamic_cast <PageDisplay*> (getSubWidgetText ()))
|
if (PageDisplay* pd = dynamic_cast <PageDisplay*> (getSubWidgetText ()))
|
||||||
{
|
{
|
||||||
pd->onMouseLostFocus ();
|
pd->onMouseLostFocus ();
|
||||||
|
|
Loading…
Reference in a new issue