From 04b32c7886b5f5f6c088efa4737e8aa5ffb7f85f Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Wed, 15 Mar 2023 07:18:37 +1000 Subject: [PATCH] Merge pull request #14604 from VOREStation/upstream-merge-8975 [MIRROR] fixes a runtime in huds deleting and the gun deletion on login issue --- code/_onclick/hud/hud.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 642ec99c73..2a997afba0 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -205,7 +205,7 @@ var/list/global_huds = list( /datum/hud/Destroy() . = ..() - qdel_null(minihuds) + QDEL_NULL_LIST(minihuds) grab_intent = null hurt_intent = null disarm_intent = null @@ -224,7 +224,9 @@ var/list/global_huds = list( other_important = null hotkeybuttons = null // item_action_list = null // ? - QDEL_LIST(ammo_hud_list) + for (var/x in ammo_hud_list) + remove_ammo_hud(mymob, x) + ammo_hud_list = null mymob = null /datum/hud/proc/hidden_inventory_update() @@ -502,4 +504,4 @@ var/list/global_huds = list( ///Update the ammo hud related to the gun G /datum/hud/proc/update_ammo_hud(mob/living/user, obj/item/weapon/gun/G) var/obj/screen/ammo/ammo_hud = ammo_hud_list[G] - ammo_hud?.update_hud(user, G) \ No newline at end of file + ammo_hud?.update_hud(user, G)