Skip to content
Snippets Groups Projects

Fix segfault when accessing skin from lua on a delayed removal

Merged Hanicef requested to merge Hanicef/SRB2Classic:fix-mobj-skin-segfault into next

Oh man has it been a while since I fixed one of these bugs.

If a Lua script accesses an mobj's skin flag if it's removal has been delayed, the game can segfault. This is due to ye olde missing P_MobjWasRemoved checked that used to plague the game back in 2.2.10. Adding these checks instead of just checking for NULL fixes the problem.

For anyone unfamiliar with these kinds of bugs: this bug can be triggered consistently on a debug build, so make sure to use that if you want to test it!

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