mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-14 15:11:40 +00:00
Fix crash on level load
This commit is contained in:
parent
1550210188
commit
5325431450
3 changed files with 2 additions and 3 deletions
|
|
@ -5336,7 +5336,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
}
|
||||
|
||||
heightsec = thing->subsector->sector->heightsec;
|
||||
if (viewplayer->mo && viewplayer->mo->subsector)
|
||||
if (viewplayer && viewplayer->mo && viewplayer->mo->subsector)
|
||||
phs = viewplayer->mo->subsector->sector->heightsec;
|
||||
else
|
||||
phs = -1;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "r_plane.h"
|
||||
#include "p_spec.h"
|
||||
#include "r_state.h"
|
||||
#include "doomstat.h" // MAXSPLITSCREENPLAYERS
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h" // for cv_glshearing
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1933,7 +1933,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
}
|
||||
|
||||
heightsec = thing->subsector->sector->heightsec;
|
||||
if (viewplayer->mo && viewplayer->mo->subsector)
|
||||
if (viewplayer && viewplayer->mo && viewplayer->mo->subsector)
|
||||
phs = viewplayer->mo->subsector->sector->heightsec;
|
||||
else
|
||||
phs = -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue