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
This commit is contained in:
@@ -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,6 +116,8 @@ namespace Content.Client.UserInterface.Systems.Alerts.Controls
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
if (!_entityManager.Deleted(_spriteViewEntity))
|
||||
_entityManager.QueueDeleteEntity(_spriteViewEntity);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user