From 26e6ba9686ea1570cd8864cb3eb3149ab20c9436 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 9 Oct 2019 18:34:54 +0200 Subject: [PATCH] Fixing a runtime when examining unloaded cit hyposprays. --- .../code/modules/reagents/reagent container/hypospraymkii.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm b/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm index 9e7da03f9b..4aa634a488 100755 --- a/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm +++ b/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm @@ -96,7 +96,10 @@ /obj/item/hypospray/mkii/examine(mob/user) . = ..() - to_chat(user, "[vial] has [vial.reagents.total_volume]u remaining.") + if(vial) + to_chat(user, "[vial] has [vial.reagents.total_volume]u remaining.") + else + to_chat(user, "It has no vial loaded in.") to_chat(user, "[src] is set to [mode ? "Inject" : "Spray"] contents on application.") /obj/item/hypospray/mkii/proc/unload_hypo(obj/item/I, mob/user)