diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index bdb8f4b863..369b17e574 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -261,6 +261,11 @@ namespace Content.Server.GameObjects.EntitySystems var userEntity = ((IPlayerSession) session).AttachedEntity; + if (userEntity == null || !userEntity.IsValid()) + { + return; + } + if (userEntity.TryGetComponent(out CombatModeComponent combatMode) && combatMode.IsInCombatMode) { DoAttack(userEntity, coords, uid);