From 0a115cbcc345c2fac3f21b59d9bd00d128635460 Mon Sep 17 00:00:00 2001 From: Birdtalon Date: Sun, 18 Nov 2018 16:40:39 +0000 Subject: [PATCH 1/2] fixes safe runtime upon deletion --- code/game/objects/structures/safe.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index a2b438c10d2..f8536354cb5 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -312,8 +312,9 @@ GLOBAL_LIST_EMPTY(safes) /obj/structure/safe/Destroy() GLOB.safes -= src - drill.soundloop.stop() - return ..() + if(drill?.soundloop) + drill.soundloop.stop() + ..() /obj/structure/safe/process() if(drill_timer) From b195aa5fa166fd4ce9e6acdefdff32f686b7cbe3 Mon Sep 17 00:00:00 2001 From: Birdtalon Date: Mon, 19 Nov 2018 14:04:51 +0000 Subject: [PATCH 2/2] removes if statement adds return --- code/game/objects/structures/safe.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index f8536354cb5..8e9b478382a 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -312,9 +312,8 @@ GLOBAL_LIST_EMPTY(safes) /obj/structure/safe/Destroy() GLOB.safes -= src - if(drill?.soundloop) - drill.soundloop.stop() - ..() + drill?.soundloop?.stop() + return ..() /obj/structure/safe/process() if(drill_timer)