Fix popup deletion raycasts (#8072)

* Fix popup deletion raycasts

* woops
This commit is contained in:
metalgearsloth
2022-05-10 19:37:02 +10:00
committed by GitHub
parent 0e945b42b2
commit 1ef2407d02

View File

@@ -145,7 +145,8 @@ namespace Content.Client.Popups
for (var i = _aliveLabels.Count - 1; i >= 0; i--)
{
var label = _aliveLabels[i];
if (label.TotalTime > PopupLifetime)
if (label.TotalTime > PopupLifetime ||
label.Entity != null && Deleted(label.Entity))
{
label.Dispose();
_aliveLabels.RemoveAt(i);