Fixed crash when clicking on back button in main menu

If menu item selection overlaps back button in main menu, clicking on back button with mouse caused a crash
See http://forum.zdoom.org/viewtopic.php?t=49711
This commit is contained in:
alexey.lysiuk 2015-10-10 15:03:14 +03:00
parent 75c5b563d1
commit bad9961376

View file

@ -491,7 +491,7 @@ bool FListMenuItemSelectable::MouseEvent(int type, int x, int y)
{
if (type == DMenu::MOUSE_Release)
{
if (DMenu::CurrentMenu->MenuEvent(MKEY_Enter, true))
if (NULL != DMenu::CurrentMenu && DMenu::CurrentMenu->MenuEvent(MKEY_Enter, true))
{
return true;
}