mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 13:51:43 +00:00
Fix use-after-frees around mobjs
# Conflicts: # src/k_kart.c # src/p_enemy.c # src/p_mobj.c # src/p_saveg.c # src/p_tick.c
This commit is contained in:
parent
371ae2fe12
commit
b03ef98753
2 changed files with 2 additions and 1 deletions
|
@ -11240,6 +11240,7 @@ void P_RemoveSavegameMobj(mobj_t *mobj)
|
|||
|
||||
// free block
|
||||
P_RemoveThinker((thinker_t *)mobj);
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
}
|
||||
|
||||
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
||||
|
|
|
@ -725,7 +725,7 @@ void R_RemoveMobjInterpolator(mobj_t *mobj)
|
|||
|
||||
if (interpolated_mobjs_len == 0) return;
|
||||
|
||||
for (i = 0; i < interpolated_mobjs_len - 1; i++)
|
||||
for (i = 0; i < interpolated_mobjs_len; i++)
|
||||
{
|
||||
if (interpolated_mobjs[i] == mobj)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue