diff --git a/src/deh_soc.c b/src/deh_soc.c index 2f2b4c1fc..427493f28 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -149,9 +149,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 05457f5dd..08ab3acfc 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1865,7 +1865,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 e038ea9ff..6547b84f5 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1336,7 +1336,8 @@ void G_DoLoadLevel(boolean resetplayer) //if (W_CheckNumForName(G_BuildMapName(gamemap)) == LUMPERROR) 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; }