mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Fixes a race condition in mutations code (#79829)
## About The Pull Request One of the timers has a callback to the `modify()` proc which also doesn't check whether the mutation owner has been deleted since the timer began, potentially resulting in a runtime.  ## Why It's Good For The Game Fixes bugs ## Changelog 🆑 fix: fixed a race condition with mutations /🆑
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
* returns an instance of a power if modification was complete
|
||||
*/
|
||||
/datum/mutation/human/proc/modify()
|
||||
if(modified || !power_path || !owner)
|
||||
if(modified || !power_path || QDELETED(owner))
|
||||
return
|
||||
var/datum/action/cooldown/modified_power = locate(power_path) in owner.actions
|
||||
if(!modified_power)
|
||||
|
||||
Reference in New Issue
Block a user