Syringe update_icon sanity

This commit is contained in:
ShizCalev
2018-01-24 17:03:06 -05:00
committed by CitadelStationBot
parent 0c86312618
commit e4a96fe2cd
@@ -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)