Fix crash on game clear

(No, game, you can't allocate a map header for the credits, why were you doing that before and how did it not break anything??)
This commit is contained in:
Inuyasha 2016-01-07 23:48:19 -08:00
parent 1e4c2f8aad
commit e1f9a01229
1 changed files with 2 additions and 1 deletions

View File

@ -2877,7 +2877,8 @@ static void G_DoCompleted(void)
// We are committed to this map now.
// We may as well allocate its header if it doesn't exist
if(!mapheaderinfo[nextmap])
// (That is, if it's a real map)
if (nextmap < NUMMAPS && !mapheaderinfo[nextmap])
P_AllocMapHeader(nextmap);
if (skipstats)