From a9ecf805e50507879e07fb111967db7fbb3a5142 Mon Sep 17 00:00:00 2001 From: Errant <35878406+Errant-4@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:17:01 +0200 Subject: [PATCH] Fix random test fail in DeleteAllThenGhost (#32753) It's simple. We kill the heisentest --- Content.Shared/Roles/SharedRoleSystem.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Roles/SharedRoleSystem.cs b/Content.Shared/Roles/SharedRoleSystem.cs index cd3fe141b2..925f61e7c7 100644 --- a/Content.Shared/Roles/SharedRoleSystem.cs +++ b/Content.Shared/Roles/SharedRoleSystem.cs @@ -478,7 +478,13 @@ public abstract class SharedRoleSystem : EntitySystem var exclusiveAntag = false; foreach (var role in mind.MindRoles) { - var roleComp = Comp(role); + if (!TryComp(role, out var roleComp)) + { + //If this ever shows up outside of an integration test, then we need to look into this further. + Log.Warning($"Mind Role Entity {role} does not have MindRoleComponent!"); + continue; + } + if (roleComp.Antag || exclusiveAntag) antagonist = true; if (roleComp.ExclusiveAntag) -- 2.51.2