Skip to content
Snippets Groups Projects

Fix segfault when P_RemoveMobj is called within A_FaceTarget action

Merged Hanicef requested to merge Hanicef/SRB2Classic:fix-remove-facetarget-action into next

While looking at !1970 (merged), I accidentally discovered a segfault caused by calls to P_RemoveMobj within the A_FaceTarget action. As usual with these issues, pretty much all calls to A_FaceTarget in the code were missing a following P_MobjWasRemoved check, which could segfault the game in some cases.

It can easily be triggered with this Lua script on CEZ1 by simply grabbing the attention from a Robo-Hood, for example:

function A_FaceTarget(mobj)
    P_RemoveMobj(mobj)
end

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
Please register or sign in to reply
Loading