From a9c0765fe1dd934310835778d9c80cde3e4faf83 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 20 Apr 2020 12:49:18 +0300 Subject: [PATCH] - fixed potential crash on intermission cast screen --- src/intermission/intermission.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index a06feac8f9..1efaa6accc 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -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; + } } }