Fix being unable to fire guns.

This commit is contained in:
Pieter-Jan Briers
2019-04-22 16:51:58 +02:00
parent 5f00394f4f
commit a75ec704e6

View File

@@ -97,7 +97,7 @@ namespace Content.Server.GameObjects
{
return;
}
if (!eventArgs.Attacked.TryGetComponent<PlaceableSurfaceComponent>(out var placeableSurfaceComponent))
if (eventArgs.Attacked == null || !eventArgs.Attacked.TryGetComponent<PlaceableSurfaceComponent>(out var placeableSurfaceComponent))
{
return;
}