From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Mon, 6 May 2024 01:38:55 +0000 (-0700) Subject: Fix AlertControl throwing an error if the sprite view entity is deleted multiple... X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=c20df3e39ffd3b28db499bcc4a0e1fb48b563826;p=space-station-14.git Fix AlertControl throwing an error if the sprite view entity is deleted multiple times (#27690) * Fix AlertControl throwing an error if disposed multiple times * Replace default check with deleted check --- diff --git a/Content.Client/UserInterface/Systems/Alerts/Controls/AlertControl.cs b/Content.Client/UserInterface/Systems/Alerts/Controls/AlertControl.cs index af93033a9d..6327757dec 100644 --- a/Content.Client/UserInterface/Systems/Alerts/Controls/AlertControl.cs +++ b/Content.Client/UserInterface/Systems/Alerts/Controls/AlertControl.cs @@ -3,7 +3,6 @@ using Content.Client.Actions.UI; using Content.Client.Cooldown; using Content.Shared.Alert; using Robust.Client.GameObjects; -using Robust.Client.Graphics; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Shared.Timing; @@ -117,7 +116,9 @@ namespace Content.Client.UserInterface.Systems.Alerts.Controls protected override void Dispose(bool disposing) { base.Dispose(disposing); - _entityManager.QueueDeleteEntity(_spriteViewEntity); + + if (!_entityManager.Deleted(_spriteViewEntity)) + _entityManager.QueueDeleteEntity(_spriteViewEntity); } }