From 37f5e175e01fccc9a5cda39dba049c3658be77bb Mon Sep 17 00:00:00 2001 From: F77F <66768086+F77F@users.noreply.github.com> Date: Fri, 17 Jul 2020 03:40:38 -0500 Subject: [PATCH] Fix construction ghost HandsComponent check (#1386) Co-authored-by: scuffedjays --- .../GameObjects/EntitySystems/ConstructionSystem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs index e403782fbf..e84b867748 100644 --- a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs @@ -274,7 +274,10 @@ namespace Content.Server.GameObjects.EntitySystems } // Try to find the stack with the material in the user's hand. - var hands = placingEnt.GetComponent(); + if(!placingEnt.TryGetComponent(out var hands)) + { + return false; + }; var activeHand = hands.GetActiveHand?.Owner; if (activeHand == null) {