diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index cc6a45a5f1f..16ccedaf778 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -384,11 +384,14 @@ if(!directly_use_energy(charge_per_item)) // provide the wait time until lathe is ready var/area/my_area = get_area(src) var/obj/machinery/power/apc/my_apc = my_area.apc - var/charging_wait = my_apc.time_to_charge(charge_per_item) - if(!isnull(charging_wait)) - say("Unable to continue production, APC overload. Wait [DisplayTimeText(charging_wait, round_seconds_to = 1)] and try again.") + if(!QDELETED(my_apc)) + var/charging_wait = my_apc.time_to_charge(charge_per_item) + if(!isnull(charging_wait)) + say("Unable to continue production, APC overload. Wait [DisplayTimeText(charging_wait, round_seconds_to = 1)] and try again.") + else + say("Unable to continue production, power grid overload.") else - say("Unable to continue production, power grid overload.") + say("Unable to continue production, no APC in area.") finalize_build() return