Fixed runtime error related to deleting worn items (#17689)

* new and improved

* Fixed the hard del again
This commit is contained in:
DamianX
2022-05-21 21:30:16 +09:00
committed by GitHub
parent f98f3b796b
commit 2f25bcb8c0
2 changed files with 4 additions and 4 deletions
-4
View File
@@ -166,10 +166,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
if(ismob(loc))
var/mob/m = loc
m.unEquip(src, 1)
else if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
if(!QDELETED(S)) // Can happen when the storage gets deleted, thus deleting the contents
S.remove_from_storage(src) // Not required to call. Will only cause runtimes
QDEL_LIST(actions)
master = null
return ..()
@@ -413,7 +413,11 @@
if(silent)
prevent_warning = TRUE
I.forceMove(src)
if(QDELING(I))
return FALSE
I.on_enter_storage(src)
if(QDELING(I))
return FALSE
for(var/_M in mobs_viewing)
var/mob/M = _M