mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Free level select memory whenever it isn't possible to go back to the menu.
This commit is contained in:
parent
5180bff05b
commit
1af1bbee3e
1 changed files with 8 additions and 0 deletions
|
@ -4134,6 +4134,8 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
M_SetupNextMenu(currentMenu->prevMenu->prevMenu);
|
||||
else
|
||||
M_ChangeLevel(0);
|
||||
Z_Free(levelselect.rows);
|
||||
levelselect.rows = NULL;
|
||||
}
|
||||
else
|
||||
M_LevelSelectWarp(0);
|
||||
|
@ -4163,6 +4165,8 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
}
|
||||
else
|
||||
M_ClearMenus(true);
|
||||
Z_Free(levelselect.rows);
|
||||
levelselect.rows = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6105,6 +6109,10 @@ static void M_ChoosePlayer(INT32 choice)
|
|||
|
||||
G_DeferedInitNew(ultmode, G_BuildMapName(startmap), (UINT8)skinnum, false, fromlevelselect);
|
||||
COM_BufAddText("dummyconsvar 1\n"); // G_DeferedInitNew doesn't do this
|
||||
|
||||
if (levelselect.rows)
|
||||
Z_Free(levelselect.rows);
|
||||
levelselect.rows = NULL;
|
||||
}
|
||||
|
||||
// ===============
|
||||
|
|
Loading…
Reference in a new issue