Fixed rare crash when menu is closed from Ticker() function

https://forum.zdoom.org/viewtopic.php?t=59112
This commit is contained in:
alexey.lysiuk 2018-01-16 11:00:48 +02:00
parent 13c4e58c3d
commit 56f656516d

View file

@ -735,7 +735,11 @@ void M_Ticker (void)
if (CurrentMenu != nullptr && menuactive != MENU_Off)
{
CurrentMenu->CallTicker();
}
// Check again because menu could be closed from Ticker()
if (CurrentMenu != nullptr && menuactive != MENU_Off)
{
for (int i = 0; i < NUM_MKEYS; ++i)
{
if (MenuButtons[i].bDown)