Add null check before using prototype in ReagentDispenserWindow (#461)

Should fix #460. I'm unable to reproduce it myself, but the stack trace shows the crash occurring on the edited line, likely because `prop` is null. This fixes that by adding a null check before using `prop`.
This commit is contained in:
moneyl
2019-11-23 18:46:48 -05:00
committed by Pieter-Jan Briers
parent d63c879404
commit ce54c489eb

View File

@@ -237,7 +237,7 @@ namespace Content.Client.GameObjects.Components.Chemistry
}
//Check if the reagent is being moused over. If so, color it green.
if (proto.ID == highlightedReagentId)
if (proto != null && proto.ID == highlightedReagentId)
{
ContainerInfo.Children.Add(new HBoxContainer
{