mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix dangling pointer in mapthing after removing mobj
This commit is contained in:
parent
a68440c4db
commit
e264caffe3
1 changed files with 4 additions and 0 deletions
|
@ -11204,6 +11204,10 @@ void P_RemoveMobj(mobj_t *mobj)
|
|||
|
||||
P_SetTarget(&mobj->hnext, P_SetTarget(&mobj->hprev, NULL));
|
||||
|
||||
// clear the reference from the mapthing
|
||||
if (mobj->spawnpoint)
|
||||
mobj->spawnpoint->mobj = NULL;
|
||||
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
|
||||
// free block
|
||||
|
|
Loading…
Reference in a new issue