From 8d6be5e6623ee579d4d95ec962aaffe0c57a25eb Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 30 Jan 2023 00:35:52 +0000 Subject: [PATCH] M_StartControlPanel: Fix incorrect interaction with NULL restoreMenu and Challenges menu --- src/k_menufunc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 7f694cf8b..3250cff23 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -457,9 +457,6 @@ void M_StartControlPanel(void) } S_ChangeMusicInternal(cv_menujam.string, true); - - if (!restoreMenu) - restoreMenu = &MainDef; } if (cv_currprofile.value == -1) // Only ask once per session. @@ -485,6 +482,8 @@ void M_StartControlPanel(void) } else { + if (restoreMenu == NULL) + restoreMenu = &MainDef; currentMenu = M_SpecificMenuRestore(M_InterruptMenuWithChallenges(restoreMenu)); }