From 0dc7d74cdc6feb6a9af211118a1cbb0f26403ef6 Mon Sep 17 00:00:00 2001 From: Charlie <69320440+hal9000PR@users.noreply.github.com> Date: Sat, 18 Jun 2022 12:11:57 +0100 Subject: [PATCH] fix? (#17994) --- code/game/objects/items/weapons/defib.dm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 5dcc6c8e4f8..e6c68d1f351 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -400,10 +400,7 @@ user.visible_message("[user] places [src] on [M.name]'s chest.", "You place [src] on [M.name]'s chest.") playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0) - if(ghost && !ghost.client) - // In case the ghost's not getting deleted for some reason - H.key = ghost.key - log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), src) + if(ghost && !ghost.client && !QDELETED(ghost)) QDEL_NULL(ghost) var/tplus = world.time - H.timeofdeath var/tlimit = DEFIB_TIME_LIMIT