Fix crash when putting gun into backpack.

This commit is contained in:
Pieter-Jan Briers
2019-03-17 14:37:05 +01:00
parent f779755c11
commit 694d6e5b33

View File

@@ -62,7 +62,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged
private void _tryFire(IEntity user, GridCoordinates coordinates, int attemptCount) 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; return;
} }