mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-22 02:01:04 +00:00
Avoid dereferencing thing before assertion checks
This commit is contained in:
parent
8ac3cb45cc
commit
dafaae65fb
1 changed files with 3 additions and 1 deletions
|
@ -2021,7 +2021,7 @@ static boolean PIT_CheckLine(line_t *ld)
|
|||
boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
|
||||
{
|
||||
INT32 xl, xh, yl, yh, bx, by;
|
||||
subsector_t *newsubsec = thing->subsector;
|
||||
subsector_t *newsubsec;
|
||||
boolean blockval = true;
|
||||
|
||||
ps_checkposition_calls.value.i++;
|
||||
|
@ -2045,6 +2045,8 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
|
|||
|
||||
if (thing->x != x || thing->y != y)
|
||||
newsubsec = R_PointInSubsector(x, y);
|
||||
else
|
||||
newsubsec = thing->subsector;
|
||||
ceilingline = blockingline = NULL;
|
||||
|
||||
// The base floor / ceiling is from the subsector
|
||||
|
|
Loading…
Reference in a new issue