Skip to content
Snippets Groups Projects

Fix segfault when shields are removed after thinking

Merged Hanicef requested to merge Hanicef/SRB2Classic:fix-removed-shield-segfault into next

For shields, there's a segfault that can trigger if a player's shield is removed using P_RemoveMobj after it's thinking logic has been invoked. This is caused by the thinking logic calling P_AddShield to add the shield for processing later when P_RunShields is invoked. The problem is that P_RemoveMobj doesn't actually remove the shield from the list of shields to be processed by P_RunShields, so if it's removed after it has been added to shields to be processed, it will attempt to process the removed shield once P_RunShields is invoked and segfault.

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