diff --git a/NEG/UI/UiManager.cs b/NEG/UI/UiManager.cs index 0300324..c54c6df 100644 --- a/NEG/UI/UiManager.cs +++ b/NEG/UI/UiManager.cs @@ -135,7 +135,7 @@ namespace NEG.UI { if (currentShownPopup.data != data) { - Debug.LogError("Popup was not shown"); + //Debug.LogError("Popup was not shown"); return; } UpdatePopupsState(false); @@ -163,7 +163,10 @@ namespace NEG.UI return; } - currentShownPopup.data?.Hide(); + if (currentShownPopup.data == null) + return; + currentShownPopup.data.PopupClosedEvent -= PopupClosed; + currentShownPopup.data.Hide(); currentShownPopup.data = null; }