mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 17:52:08 -10:00
When iterating through `Ship_obj_list`, check the `Should_be_dead` flag before using the object. This fixes #4990 and adds defense-in-depth checks to guard against similar errors elsewhere. I considered moving the `Ship_obj_list` removal from `obj_delete` to `ship_cleanup`, but decided it would be prudent to avoid fundamental changes to lifecycle management.