mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-25 02:01:46 +00:00
- SW: added a double deletion guard to KillBreakSprite.
This code can easily run into the case where SpawnShrap kills the actor but then further operations are performed, including deleting it again.
This commit is contained in:
parent
be92d252ff
commit
9f83fd3575
1 changed files with 5 additions and 0 deletions
|
@ -808,6 +808,11 @@ bool HitBreakWall(walltype* wp, int hit_x, int hit_y, int hit_z, int ang, int ty
|
|||
|
||||
int KillBreakSprite(DSWActor* breakActor)
|
||||
{
|
||||
// Double deletion can easily happen with the break sprite code.
|
||||
if (breakActor->ObjectFlags & OF_EuthanizeMe)
|
||||
return false;
|
||||
|
||||
|
||||
// Does not actually kill the sprite so it will be valid for the rest
|
||||
// of the loop traversal.
|
||||
|
||||
|
|
Loading…
Reference in a new issue