diff --git a/code/game/gamemodes/cm_self_destruct.dm b/code/game/gamemodes/cm_self_destruct.dm index b86de24eed74..07c9c43a4768 100644 --- a/code/game/gamemodes/cm_self_destruct.dm +++ b/code/game/gamemodes/cm_self_destruct.dm @@ -259,12 +259,12 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi var/list/alive_mobs = list() //Everyone who will be destroyed on the zlevel(s). var/list/dead_mobs = list() //Everyone who only needs to see the cinematic. for(var/mob/current_mob as anything in GLOB.mob_list) //This only does something cool for the people about to die, but should prove pretty interesting. - if(!current_mob || !current_mob.loc) + var/turf/current_turf = get_turf(current_mob) + if(!current_mob || !current_mob.loc || !current_turf) continue //In case something changes when we sleep(). if(current_mob.stat == DEAD) dead_mobs |= current_mob continue - var/turf/current_turf = get_turf(current_mob) if(current_turf.z in z_levels) alive_mobs |= current_mob shake_camera(current_mob, 110, 4) @@ -286,6 +286,8 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi for(var/mob/current_mob in alive_mobs) if(current_mob && current_mob.loc) //Who knows, maybe they escaped, or don't exist anymore. var/turf/current_mob_turf = get_turf(current_mob) + if(!current_mob_turf) + continue if(current_mob_turf.z in z_levels) if(istype(current_mob.loc, /obj/structure/closet/secure_closet/freezer/fridge)) continue