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??)

(cherry picked from commit e1f9a012297d5220dcdd9395265467621a170e32)
This commit is contained in:
Inuyasha 2016-01-07 23:48:19 -08:00
parent caab150c92
commit 1203b0aa73
1 changed files with 2 additions and 1 deletions

View File

@ -2874,7 +2874,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)