From 32d566f7a2171eacb9b6713a9d1f98e3a1db6be6 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 22 Oct 2011 13:38:13 +0000 Subject: Fix crash when pressing escape in help screens. Subversion-branch: /branches/v2-branch Subversion-revision: 2453 --- src/heretic/mn_menu.c | 5 ++++- src/hexen/mn_menu.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index bba0da5c..75728427 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -1599,7 +1599,10 @@ void MN_ActivateMenu(void) void MN_DeactivateMenu(void) { - CurrentMenu->oldItPos = CurrentItPos; + if (CurrentMenu != NULL) + { + CurrentMenu->oldItPos = CurrentItPos; + } MenuActive = false; if (!netgame) { diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c index 94f6b1a3..4c887152 100644 --- a/src/hexen/mn_menu.c +++ b/src/hexen/mn_menu.c @@ -1723,7 +1723,10 @@ void MN_ActivateMenu(void) void MN_DeactivateMenu(void) { - CurrentMenu->oldItPos = CurrentItPos; + if (CurrentMenu != NULL) + { + CurrentMenu->oldItPos = CurrentItPos; + } MenuActive = false; if (!netgame) { -- cgit v1.2.3