Merge remote-tracking branch 'origin/main' into better-ui-manager

This commit is contained in:
Hubert Mattusch 2023-06-05 20:56:41 +02:00
commit 611f417d5e

View File

@ -138,7 +138,7 @@ namespace NEG.UI
{ {
if (currentShownPopup.data != data) if (currentShownPopup.data != data)
{ {
Debug.LogError("Popup was not shown"); //Debug.LogError("Popup was not shown");
return; return;
} }
UpdatePopupsState(false); UpdatePopupsState(false);
@ -167,7 +167,10 @@ namespace NEG.UI
return; return;
} }
currentShownPopup.data?.Hide(); if (currentShownPopup.data == null)
return;
currentShownPopup.data.PopupClosedEvent -= PopupClosed;
currentShownPopup.data.Hide();
currentShownPopup.data = null; currentShownPopup.data = null;
} }