summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2011-10-22 13:38:13 +0000
committerSimon Howard2011-10-22 13:38:13 +0000
commit32d566f7a2171eacb9b6713a9d1f98e3a1db6be6 (patch)
treeae5b7dcefa780dda059a14c0c5a14435fc0954ed
parentdaa2dde19e2b1d27477eaa618157551d3fcd84bb (diff)
downloadchocolate-doom-32d566f7a2171eacb9b6713a9d1f98e3a1db6be6.tar.gz
chocolate-doom-32d566f7a2171eacb9b6713a9d1f98e3a1db6be6.tar.bz2
chocolate-doom-32d566f7a2171eacb9b6713a9d1f98e3a1db6be6.zip
Fix crash when pressing escape in help screens.
Subversion-branch: /branches/v2-branch Subversion-revision: 2453
-rw-r--r--src/heretic/mn_menu.c5
-rw-r--r--src/hexen/mn_menu.c5
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)
{