Fixes runtime in add_reagent() (#7676)

Bad index: data["species"] when data is not a list
This commit is contained in:
Atermonera
2020-09-22 20:39:25 -07:00
committed by VirgoBot
parent 41c8e4a671
commit 3204c9f9a5

View File

@@ -115,7 +115,7 @@
for(var/datum/reagent/current in reagent_list)
if(current.id == id)
if(current.id == "blood")
if(!isnull(data["species"]) && !isnull(current.data["species"]) && data["species"] != current.data["species"]) // Species bloodtypes are already incompatible, this just stops it from mixing into the one already in a container.
if(LAZYLEN(data) && !isnull(data["species"]) && !isnull(current.data["species"]) && data["species"] != current.data["species"]) // Species bloodtypes are already incompatible, this just stops it from mixing into the one already in a container.
continue
current.volume += amount