Merge branch 'fix-wallspike-segfault' into 'next'

Fix segfault when destroying wall spike while it moves

See merge request STJr/SRB2!1959
This commit is contained in:
MascaraSnake 2023-04-12 09:19:50 +00:00
commit d6375b1e18

View file

@ -10061,6 +10061,8 @@ static boolean P_FuseThink(mobj_t *mobj)
case MT_SPIKE:
case MT_WALLSPIKE:
P_SetMobjState(mobj, mobj->state->nextstate);
if (P_MobjWasRemoved(mobj))
return false;
mobj->fuse = mobj->spawnpoint ? mobj->spawnpoint->args[0] : mobj->info->speed;
break;
case MT_NIGHTSCORE: