diff --git a/code/controllers/subsystems/ping.dm b/code/controllers/subsystems/ping.dm index 7b41519737f..0b76d7dea17 100644 --- a/code/controllers/subsystems/ping.dm +++ b/code/controllers/subsystems/ping.dm @@ -27,7 +27,7 @@ SUBSYSTEM_DEF(ping) var/client/client = currentrun[currentrun.len] currentrun.len-- - if(!client.is_preference_enabled(/datum/client_preference/vchat_enable)) + if(!client?.is_preference_enabled(/datum/client_preference/vchat_enable)) winset(client, "output", "on-show=&is-disabled=0&is-visible=1") winset(client, "browseroutput", "is-disabled=1;is-visible=0") client.tgui_panel.oldchat = TRUE diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index f8821c89d03..7b27dfb9ac3 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -135,6 +135,11 @@ stat_modules += new/stat_rig_module/select(src) stat_modules += new/stat_rig_module/charge(src) +/obj/item/rig_module/Destroy(force, ...) + QDEL_NULL_LIST(stat_modules) + . = ..() + + // Called when the module is installed into a suit. /obj/item/rig_module/proc/installed(var/obj/item/weapon/rig/new_holder) holder = new_holder @@ -260,6 +265,10 @@ ..() src.module = module +/stat_rig_module/Destroy() + module = null + . = ..() + /stat_rig_module/proc/AddHref(var/list/href_list) return diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 081f08ed498..742a10ffabc 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -159,11 +159,17 @@ update_icon(1) /obj/item/weapon/rig/Destroy() - for(var/obj/item/piece in list(gloves,boots,helmet,chest)) + for(var/obj/item/piece in list(gloves,boots,helmet,chest,cell,air_supply)) var/mob/living/M = piece.loc if(istype(M)) M.drop_from_inventory(piece) qdel(piece) + gloves = null + boots = null + helmet = null + chest = null + cell = null + air_supply = null STOP_PROCESSING(SSobj, src) qdel(wires) wires = null