diff --git a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs index 114a7428e9..79bbf6e7c9 100644 --- a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs +++ b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs @@ -11,6 +11,7 @@ using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Log; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Serialization; @@ -181,7 +182,13 @@ namespace Content.Shared.GameObjects.Components.Pulling return; } - Puller = Owner.EntityManager.GetEntity(state.Puller.Value); + if (!Owner.EntityManager.TryGetEntity(state.Puller.Value, out var entity)) + { + Logger.Error($"Invalid entity {state.Puller.Value} for pulling"); + return; + } + + Puller = entity; } public override void HandleMessage(ComponentMessage message, IComponent? component)