From 694d6e5b334fa268b3c7b34823ee6d1810ebe266 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 17 Mar 2019 14:37:05 +0100 Subject: [PATCH] Fix crash when putting gun into backpack. --- .../GameObjects/Components/Weapon/Ranged/RangedWeapon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/RangedWeapon.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/RangedWeapon.cs index bdf86e5638..13ee023499 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/RangedWeapon.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/RangedWeapon.cs @@ -62,7 +62,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged private void _tryFire(IEntity user, GridCoordinates coordinates, int attemptCount) { - if (!user.TryGetComponent(out HandsComponent hands) || hands.GetActiveHand.Owner != Owner) + if (!user.TryGetComponent(out HandsComponent hands) || hands.GetActiveHand?.Owner != Owner) { return; }