Add a mapheader check to M_CampaignWarpIsCheat

This commit is contained in:
MIDIMan 2023-09-08 22:03:25 -04:00
parent 7debef176b
commit 9b5cfe856c

View file

@ -509,7 +509,7 @@ UINT8 M_CampaignWarpIsCheat(INT32 gt, INT32 mapnum, gamedata_t *data)
return true;
}
if (mapheaderinfo[mapnum-1]->menuflags & LF2_HIDEINMENU)
if (!mapheaderinfo[mapnum-1] || mapheaderinfo[mapnum-1]->menuflags & LF2_HIDEINMENU)
{
// You're never allowed to warp to this level.
return true;