diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs index 639ceae889..c6a7d7a178 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs @@ -8,7 +8,6 @@ using Content.Server.GameObjects.Components.Projectiles; using Content.Shared.Damage; using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels; -using Content.Shared.GameObjects.EntitySystems; using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces.GameObjects.Components; @@ -39,7 +38,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels [ViewVariables] private string _ammoPrototype; [ViewVariables] public IEntity PowerCellEntity => _powerCellContainer.ContainedEntity; - public BatteryComponent PowerCell => _powerCellContainer.ContainedEntity.GetComponent(); + public BatteryComponent PowerCell => _powerCellContainer.ContainedEntity?.GetComponent(); private ContainerSlot _powerCellContainer; private ContainerSlot _ammoContainer; private string _powerCellPrototype;