]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix AlertControl throwing an error if the sprite view entity is deleted multiple...
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Mon, 6 May 2024 01:38:55 +0000 (18:38 -0700)
committerGitHub <noreply@github.com>
Mon, 6 May 2024 01:38:55 +0000 (21:38 -0400)
* Fix AlertControl throwing an error if disposed multiple times

* Replace default check with deleted check

Content.Client/UserInterface/Systems/Alerts/Controls/AlertControl.cs

index af93033a9d3a8664736ebcae736d171aabc3a11c..6327757dec2dc1db35d25a3a5e7e57c2690b33b3 100644 (file)
@@ -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);
         }
     }