From 2bc8e8dc49e3926d064b8ce9426ecacd169232d0 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Mon, 15 Nov 2021 00:19:41 +1300 Subject: [PATCH] Fix infinite loop In explosions (#5330) --- Content.Server/Explosion/EntitySystems/ExplosionSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs index d56a8fb32f..f14018c3e5 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs @@ -306,9 +306,9 @@ namespace Content.Server.Explosion.EntitySystems } else { - while (EntityManager.TryGetComponent(entity, out ContainerManagerComponent? container)) + while (EntityManager.TryGetEntity(entity, out var e) && e.TryGetContainer(out var container)) { - entity = container.OwnerUid; + entity = container.Owner.Uid; } if (!EntityManager.TryGetComponent(entity, out transform))