Various Null Access Fixes (#22730)

<img width="1420" height="776" alt="image"
src="https://github.com/user-attachments/assets/d33c4ce2-9c5b-48c3-ac8b-5edfee51c7e0"
/>

Just a few fixes for some various runtime errors and two hard del
triggers on the Sentry logs.
This commit is contained in:
VMSolidus
2026-06-19 17:57:37 +00:00
committed by GitHub
parent 1c6938707c
commit a67a6ae94a
5 changed files with 23 additions and 11 deletions
+2 -2
View File
@@ -96,12 +96,12 @@
/datum/event/carp_migration/end(var/faked)
..()
for (var/carp_ref in spawned_carp)
var/datum/weakref/carp_weakref = carp_ref
for (var/datum/weakref/carp_weakref in spawned_carp)
var/mob/living/simple_animal/hostile/carp/fish = carp_weakref.resolve()
if (fish && prob(50) && is_type_in_typecache(fish.loc, despawn_turfs))
spawned_carp -= carp_weakref
qdel(carp_weakref)
spawned_carp?.Cut()
/datum/event/carp_migration/cozmo/start()
..()
+6 -2
View File
@@ -34,8 +34,10 @@
..()
var/num_recovered = 0
for(var/drone in drones_list)
var/mob/living/simple_animal/hostile/icarus_drone/malf/D = drone
for(var/mob/living/simple_animal/hostile/icarus_drone/malf/D in drones_list)
if (QDELETED(D))
continue
spark(D.loc, 3)
D.beam_out()
num_recovered++
@@ -45,3 +47,5 @@
command_announcement.Announce(SSatlas.current_map.rogue_drone_end_message, "Rogue Drone Alert", new_sound = 'sound/AI/rogue_drone_end_message.ogg', zlevels = affecting_z)
else
command_announcement.Announce(SSatlas.current_map.rogue_drone_destroyed_message, "Rogue Drone Alert", new_sound = 'sound/AI/rogue_drone_destroyed_message.ogg', zlevels = affecting_z)
drones_list?.Cut()