Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 committed Oct 30, 2024
1 parent 34f46ac commit 6357fbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Content.Shared/Follower/FollowerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -249,9 +250,10 @@ public void StopFollowingEntity(EntityUid uid, EntityUid target, FollowedCompone
// Sunrise-Edit
RemComp<BlockMovementComponent>(uid);

if (TryComp<FollowerComponent>(uid, out var followerComponent))
if (TryComp<FollowerComponent>(uid, out var followerComponent) && followerComponent.StopFollowActionEntity != null)
{
_actions.RemoveAction(uid, followerComponent.StopFollowActionEntity);
_actionContainer.RemoveAction(followerComponent.StopFollowActionEntity.Value);
}
// Sunrise-Edit

Expand Down

0 comments on commit 6357fbd

Please sign in to comment.