Files
Bubberstation/code/modules/mob
Bloop 4cccfddd52 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

🆑
fix: fixed a runtime in handle_dead_metabolism()
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-11-26 22:17:21 -07:00
..
2023-11-26 17:42:02 +01:00
2023-11-25 21:03:29 -08:00