Fix title screen crash

This commit is contained in:
SteelT 2022-09-11 19:36:34 -04:00
parent 524eff9fde
commit 430f357f87

View file

@ -1836,8 +1836,6 @@ static void F_CacheTitleScreen(void)
void F_StartTitleScreen(void) void F_StartTitleScreen(void)
{ {
const INT32 titleMapNum = G_MapNumber(titlemap);
setup_numplayers = 0; setup_numplayers = 0;
if (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS) if (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS)
@ -1849,10 +1847,11 @@ void F_StartTitleScreen(void)
else else
wipegamestate = GS_TITLESCREEN; wipegamestate = GS_TITLESCREEN;
if (mapheaderinfo[titleMapNum]) if (titlemap)
{ {
mapthing_t *startpos; mapthing_t *startpos;
const INT32 titleMapNum = G_MapNumber(titlemap);
gamestate_t prevwipegamestate = wipegamestate; gamestate_t prevwipegamestate = wipegamestate;
titlemapinaction = TITLEMAP_LOADING; titlemapinaction = TITLEMAP_LOADING;
titlemapcameraref = NULL; titlemapcameraref = NULL;