Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Fixes race condition in Life() [MDB IGNORE] (#25279)
* Fixes race condition in Life() (#79934) ## About The Pull Request This fixes the following runtime by adding sanity checking for `reagents`: ![image](https://github.com/tgstation/tgstation/assets/13398309/6e83b958-5144-4822-aed6-7ee4bb3d779b) It can be null, which I presume is from the mob being qdeleted in the middle of a `Life()` tick but I'm not 100% sure of that. The check for `QDELETED(src)` happens after `handle_organs()` and `handle_dead_metabolism()`, which there was no protection against there being a null reagent var for either of those procs. I was debating moving the order of the procs around, but I decided against it because I think it may be this way for a reason (`organ.on_death()` gets called in `handle_organs()`), plus again I'm not 100% sure that the `reagents` is being nulled from qdeletion. ## Why It's Good For The Game Fixes a bug that kept coming up in CI ## Changelog :cl: fix: fixed a runtime in handle_dead_metabolism() /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> * Fixes race condition in Life() --------- Co-authored-by: Bloop <[email protected]> Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
- Loading branch information