mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-29 15:42:03 +00:00
Merge branch 'fix-spawnpoint-dangling-mobj' into 'next'
Fix dangling pointer in mapthing after removing mobj See merge request STJr/SRB2!2007
This commit is contained in:
commit
f32dfb4bc3
1 changed files with 4 additions and 0 deletions
|
@ -11206,6 +11206,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