mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Fix P_SetTarget crash by setting th->target to NULL first
This commit is contained in:
parent
1d04001fdf
commit
7c9b1ee2cb
1 changed files with 1 additions and 0 deletions
|
@ -2647,6 +2647,7 @@ INT32 EV_DoPolyObjWaypoint(polywaypointdata_t *pwdata)
|
|||
|
||||
// Set pointnum
|
||||
th->pointnum = target->health;
|
||||
th->target = NULL; // set to NULL first so the below doesn't go wrong
|
||||
// Set the mobj as your target! -- Monster Iestyn 27/12/19
|
||||
P_SetTarget(&th->target, target);
|
||||
|
||||
|
|
Loading…
Reference in a new issue