R_SkinUsable: Only check header of current map if one exists

This commit is contained in:
MascaraSnake 2023-04-11 19:13:30 +02:00
parent 846cf71e6a
commit 8486bd083a

View file

@ -225,7 +225,7 @@ boolean R_SkinUsable(INT32 playernum, INT32 skinnum)
return true;
}
if (Playing() && (R_SkinAvailable(mapheaderinfo[gamemap-1]->forcecharacter) == skinnum))
if (Playing() && mapheaderinfo[gamemap-1] && (R_SkinAvailable(mapheaderinfo[gamemap-1]->forcecharacter) == skinnum))
{
// Force 1.
return true;