Catch some areas that previously checked for map lump, but stopped doing so for a bit.

This commit is contained in:
toaster 2022-09-17 00:02:54 +01:00
parent dcd63aece9
commit acc92ba4c9
2 changed files with 3 additions and 3 deletions

View file

@ -2918,7 +2918,7 @@ void G_DoPlayDemo(char *defdemoname)
demo_p += 4; // Extrainfo location
// ...*map* not loaded?
if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1])
if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || mapheaderinfo[gamemap-1]->lumpnum == LUMPERROR)
{
snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname);
CONS_Alert(CONS_ERROR, "%s", msg);

View file

@ -3698,9 +3698,9 @@ static void G_DoCompleted(void)
cm = nextmap; //Start the loop again so that the error checking below is executed.
//Make sure the map actually exists before you try to go to it!
if (cm < 0 || cm >= nummapheaders)
if (cm < 0 || cm >= nummapheaders || mapheaderinfo[cm]->lumpnum == LUMPERROR)
{
CONS_Alert(CONS_ERROR, M_GetText("Next map given (MAP %d) doesn't exist! Reverting to MAP01.\n"), cm+1);
CONS_Alert(CONS_ERROR, M_GetText("Next map given (id %d) doesn't exist! Reverting to id 0.\n"), cm+1);
cm = 0;
break;
}