mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
Fix a crash.
This commit is contained in:
parent
295b100df4
commit
7fb2e6633e
1 changed files with 8 additions and 3 deletions
11
src/m_menu.c
11
src/m_menu.c
|
@ -2151,6 +2151,8 @@ static void M_GoBack(INT32 choice)
|
|||
if ((currentMenu->prevMenu == &MainDef) && (currentMenu == &SP_TimeAttackDef || currentMenu == &SP_NightsAttackDef))
|
||||
{
|
||||
// D_StartTitle does its own wipe, since GS_TIMEATTACK is now a complete gamestate.
|
||||
Z_Free(levelselect.rows);
|
||||
levelselect.rows = NULL;
|
||||
menuactive = false;
|
||||
D_StartTitle();
|
||||
}
|
||||
|
@ -4279,6 +4281,12 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
|
||||
if (exitmenu)
|
||||
{
|
||||
if (gamestate != GS_TIMEATTACK)
|
||||
{
|
||||
Z_Free(levelselect.rows);
|
||||
levelselect.rows = NULL;
|
||||
}
|
||||
|
||||
if (currentMenu->prevMenu)
|
||||
{
|
||||
M_SetupNextMenu(currentMenu->prevMenu);
|
||||
|
@ -4287,9 +4295,6 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
else
|
||||
M_ClearMenus(true);
|
||||
|
||||
Z_Free(levelselect.rows);
|
||||
levelselect.rows = NULL;
|
||||
|
||||
Z_Free(char_notes);
|
||||
char_notes = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue