popups fix

This commit is contained in:
Hubert Mattusch 2023-06-01 00:25:38 +02:00
parent 42dbfc8827
commit 1f2c251d0c

View File

@ -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;
}