Skip to content
Snippets Groups Projects

Fix dangling pointer in mapthing after removing mobj

Merged Hanicef requested to merge Hanicef/SRB2Classic:fix-spawnpoint-dangling-mobj into next

When a mobj that is spawned by a mapthing is removed, the corresponding mobj pointer inside the mapthing is not cleared. This can, in some rare cases, cause segfaults to trigger. One such case where this can happen is when bosses try to find their flying point after being destroyed, where P_FindBossFlyPoint starts to iterate through all mapthings to find where to fly next. If one of the corresponding mobjs in the list is dangling, it might trigger a segfault when the mobj is dereferenced.

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
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading