From 946fa9a440bde17fb2bd6358660bacd55a059c60 Mon Sep 17 00:00:00 2001 From: Rinary <72972221+Rinary1@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:14:38 +0200 Subject: [PATCH] fix (#572) --- Content.Shared/Follower/FollowerSystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Follower/FollowerSystem.cs b/Content.Shared/Follower/FollowerSystem.cs index 42f611913a2..79398c4c4f9 100644 --- a/Content.Shared/Follower/FollowerSystem.cs +++ b/Content.Shared/Follower/FollowerSystem.cs @@ -32,6 +32,7 @@ public sealed class FollowerSystem : EntitySystem [Dependency] private readonly INetManager _netMan = default!; [Dependency] private readonly ISharedAdminManager _adminManager = default!; [Dependency] private readonly SharedActionsSystem _actions = default!; + [Dependency] private readonly ActionContainerSystem _actionContainer = default!; public override void Initialize() { @@ -249,9 +250,10 @@ public void StopFollowingEntity(EntityUid uid, EntityUid target, FollowedCompone // Sunrise-Edit RemComp(uid); - if (TryComp(uid, out var followerComponent)) + if (TryComp(uid, out var followerComponent) && followerComponent.StopFollowActionEntity != null) { _actions.RemoveAction(uid, followerComponent.StopFollowActionEntity); + _actionContainer.RemoveAction(followerComponent.StopFollowActionEntity.Value); } // Sunrise-Edit