mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-16 17:11:33 +00:00
Merge branch 'mapheader-alloc-fix' into 'next'
Fix R_SkinUsable crashes in (some) custom addons Closes #994 See merge request STJr/SRB2!1962
This commit is contained in:
commit
efee750874
2 changed files with 3 additions and 1 deletions
|
@ -2503,6 +2503,8 @@ void F_StartTitleScreen(void)
|
|||
{
|
||||
titlemapinaction = TITLEMAP_OFF;
|
||||
gamemap = 1; // g_game.c
|
||||
if (!mapheaderinfo[gamemap-1])
|
||||
P_AllocMapHeader(gamemap-1);
|
||||
CON_ClearHUD();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue