M_StartControlPanel: Fix incorrect interaction with NULL restoreMenu and Challenges menu

This commit is contained in:
toaster 2023-01-30 00:35:52 +00:00
parent 749de36734
commit 8d6be5e662

View file

@ -457,9 +457,6 @@ void M_StartControlPanel(void)
} }
S_ChangeMusicInternal(cv_menujam.string, true); S_ChangeMusicInternal(cv_menujam.string, true);
if (!restoreMenu)
restoreMenu = &MainDef;
} }
if (cv_currprofile.value == -1) // Only ask once per session. if (cv_currprofile.value == -1) // Only ask once per session.
@ -485,6 +482,8 @@ void M_StartControlPanel(void)
} }
else else
{ {
if (restoreMenu == NULL)
restoreMenu = &MainDef;
currentMenu = M_SpecificMenuRestore(M_InterruptMenuWithChallenges(restoreMenu)); currentMenu = M_SpecificMenuRestore(M_InterruptMenuWithChallenges(restoreMenu));
} }