diff --git a/code/modules/lootpanel/contents.dm b/code/modules/lootpanel/contents.dm index 44f4acd47f2..2fcd4201d8a 100644 --- a/code/modules/lootpanel/contents.dm +++ b/code/modules/lootpanel/contents.dm @@ -21,6 +21,8 @@ if(!istype(thing)) stack_trace("Non-atom in the contents of [source_turf]!") continue + if(QDELETED(thing)) + continue if(thing.mouse_opacity == MOUSE_OPACITY_TRANSPARENT) continue if(thing.IsObscured()) diff --git a/code/modules/lootpanel/search_object.dm b/code/modules/lootpanel/search_object.dm index 149be76e710..2cb0bdf85db 100644 --- a/code/modules/lootpanel/search_object.dm +++ b/code/modules/lootpanel/search_object.dm @@ -62,6 +62,7 @@ /datum/search_object/Destroy(force) item = null + icon = null return ..() @@ -75,6 +76,9 @@ /datum/search_object/proc/on_item_moved(atom/source) SIGNAL_HANDLER + if(QDELETED(src)) + return + qdel(src) @@ -82,4 +86,4 @@ /datum/search_object/proc/on_turf_change(turf/source, path, list/new_baseturfs, flags, list/post_change_callbacks) SIGNAL_HANDLER - post_change_callbacks += CALLBACK(src, GLOBAL_PROC_REF(qdel), src) + post_change_callbacks += CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), src)