From 55347ff3762c8c1dedb03a779e5f949fc87d60ac Mon Sep 17 00:00:00 2001 From: Arturlang <24881678+Arturlang@users.noreply.github.com> Date: Thu, 23 May 2024 05:55:46 +0300 Subject: [PATCH] Fixes bitrunner glitches not spawning if the reference list has a invalid ref (#1451) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …has a null ref, somehow ## About The Pull Request See title ## Why It's Good For The Game Most of the time, due to this, a glitch won't even spawn ## Proof Of Testing Went ingame, tested it, spawned as a glitch ## Changelog :cl: fix: Bitrunner glitches should now spawn properly more often /:cl: --------- Co-authored-by: nevimer <77420409+nevimer@users.noreply.github.com> --- code/modules/bitrunning/server/threats.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/bitrunning/server/threats.dm b/code/modules/bitrunning/server/threats.dm index 66a96d9971f..59d5646eca1 100644 --- a/code/modules/bitrunning/server/threats.dm +++ b/code/modules/bitrunning/server/threats.dm @@ -156,7 +156,7 @@ /// Removes any invalid candidates from the list /obj/machinery/quantum_server/proc/validate_mutation_candidates() for(var/datum/weakref/creature_ref as anything in mutation_candidate_refs) - var/mob/living/creature = creature_ref.resolve() + var/mob/living/creature = creature_ref?.resolve() // BUBBER EDIT - REF CHECK for RUNTIME AVOIDANCE if(isnull(creature) || creature.mind) mutation_candidate_refs.Remove(creature_ref)