From ce54c489ebc32e02f9bdd21835661277a347f422 Mon Sep 17 00:00:00 2001 From: moneyl <8206401+Moneyl@users.noreply.github.com> Date: Sat, 23 Nov 2019 18:46:48 -0500 Subject: [PATCH] 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`. --- .../GameObjects/Components/Chemistry/ReagentDispenserWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/GameObjects/Components/Chemistry/ReagentDispenserWindow.cs b/Content.Client/GameObjects/Components/Chemistry/ReagentDispenserWindow.cs index e276c1b929..60e044d64d 100644 --- a/Content.Client/GameObjects/Components/Chemistry/ReagentDispenserWindow.cs +++ b/Content.Client/GameObjects/Components/Chemistry/ReagentDispenserWindow.cs @@ -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 {