Syringe update_icon sanity

This commit is contained in:
ShizCalev
2018-01-25 22:50:59 -06:00
committed by KorPhaeron
parent 61fe922cce
commit 007b8b86f6
@@ -156,7 +156,7 @@
/obj/item/reagent_containers/syringe/update_icon()
cut_overlays()
var/rounded_vol
if(reagents.total_volume)
if(reagents && reagents.total_volume)
rounded_vol = CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
filling_overlay.color = mix_color_from_reagents(reagents.reagent_list)