From bad99613760763e588f685fb168b2dbfb10a2aa2 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 10 Oct 2015 15:03:14 +0300 Subject: [PATCH] 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 --- src/menu/listmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu/listmenu.cpp b/src/menu/listmenu.cpp index 8c63eb35b3..0f50d1e004 100644 --- a/src/menu/listmenu.cpp +++ b/src/menu/listmenu.cpp @@ -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; }