- fixed potential crash on intermission cast screen

This commit is contained in:
alexey.lysiuk 2020-04-20 12:49:18 +03:00
parent 4fb6b7c7d4
commit a9c0765fe1

View file

@ -848,20 +848,20 @@ bool DIntermissionController::Responder (event_t *ev)
{
const char *cmd = Bindings.GetBind (ev->data1);
if (cmd != NULL &&
(!stricmp(cmd, "toggleconsole") ||
!stricmp(cmd, "screenshot")))
if (cmd != nullptr)
{
return false;
}
// The following is needed to be able to enter main menu with a controller,
// by pressing buttons that are usually assigned to this action, Start and Back by default
if (!stricmp(cmd, "menu_main") || !stricmp(cmd, "pause"))
{
M_StartControlPanel(true);
M_SetMenu(NAME_Mainmenu, -1);
return true;
if (!stricmp(cmd, "toggleconsole") || !stricmp(cmd, "screenshot"))
{
return false;
}
// The following is needed to be able to enter main menu with a controller,
// by pressing buttons that are usually assigned to this action, Start and Back by default
else if (!stricmp(cmd, "menu_main") || !stricmp(cmd, "pause"))
{
M_StartControlPanel(true);
M_SetMenu(NAME_Mainmenu, -1);
return true;
}
}
}