Converts Most Destroys to use QDEL_NULL

This commit is contained in:
Fox-McCloud
2017-04-04 23:08:41 -04:00
parent ba8b1dae55
commit 5631d36ff8
121 changed files with 217 additions and 468 deletions
@@ -41,9 +41,7 @@ var/list/global_modular_computers = list()
global_modular_computers.Add(src)
/obj/machinery/modular_computer/Destroy()
if(cpu)
qdel(cpu)
cpu = null
QDEL_NULL(cpu)
return ..()
/obj/machinery/modular_computer/attack_ghost(mob/dead/observer/user)
@@ -18,8 +18,7 @@
/datum/computer_file/program/alarm_monitor/Destroy()
for(var/datum/alarm_handler/AH in alarm_handlers)
AH.unregister(src)
qdel(alarm_handlers)
alarm_handlers = null
QDEL_NULL(alarm_handlers)
return ..()
/datum/computer_file/program/alarm_monitor/proc/update_icon()
@@ -11,9 +11,7 @@
var/locked = FALSE
/obj/item/weapon/computer_hardware/ai_slot/Destroy()
if(stored_card)
qdel(stored_card)
stored_card = null
QDEL_NULL(stored_card)
return ..()
@@ -14,9 +14,7 @@
..()
/obj/item/weapon/computer_hardware/battery/Destroy()
if(battery)
qdel(battery)
battery = null
QDEL_NULL(battery)
return ..()
/obj/item/weapon/computer_hardware/battery/on_remove(obj/item/device/modular_computer/M, mob/living/user = null)
@@ -11,12 +11,8 @@
var/obj/item/weapon/card/id/stored_card2 = null
/obj/item/weapon/computer_hardware/card_slot/Destroy()
if(stored_card)
qdel(stored_card)
stored_card = null
if(stored_card2)
qdel(stored_card2)
stored_card2 = null
QDEL_NULL(stored_card)
QDEL_NULL(stored_card2)
return ..()
/obj/item/weapon/computer_hardware/card_slot/GetAccess()