diff --git a/src/deh_soc.c b/src/deh_soc.c index 7efbaa5e5..85b1afda1 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -151,9 +151,6 @@ void clear_levels(void) if (!mapheaderinfo[nummapheaders]) continue; - if (strcmp(mapheaderinfo[nummapheaders]->lumpname, tutorialmap) == 0) // Sal: Is this needed...? - continue; - // Custom map header info // (no need to set num to 0, we're freeing the entire header shortly) Z_Free(mapheaderinfo[nummapheaders]->customopts); diff --git a/src/f_finale.c b/src/f_finale.c index ff3690ea1..32255dcd4 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1145,7 +1145,7 @@ void F_StartTitleScreen(void) globalweather = mapheaderinfo[titleMapNum]->weather; G_DoLoadLevel(true); - if (!titleMapNum) + if (!titlemap) return; players[displayplayers[0]].playerstate = PST_DEAD; // Don't spawn the player in dummy (I'm still a filthy cheater) diff --git a/src/g_game.c b/src/g_game.c index a10a6dec7..d598ce30c 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1361,7 +1361,8 @@ void G_DoLoadLevel(boolean resetplayer) { if (gamemap < 1 || gamemap > nummapheaders) { - titlemap = 0; // let's not infinite recursion ok + Z_Free(titlemap); + titlemap = NULL; // let's not infinite recursion ok Command_ExitGame_f(); return; }