Fix for error on close
This commit is contained in:
parent
f8d8b9fd12
commit
20e281f9dd
@ -29,6 +29,8 @@ namespace NEG.UI.Area
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
|
if(UiManager.Instance == null)
|
||||||
|
return;
|
||||||
if (ReferenceEquals(UiManager.Instance.CurrentArea, this))
|
if (ReferenceEquals(UiManager.Instance.CurrentArea, this))
|
||||||
UiManager.Instance.CurrentArea = null;
|
UiManager.Instance.CurrentArea = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,10 @@ namespace NEG.UI.UnityUi.Window
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
if (IsOpened) UiManager.Instance.OnWindowClosed(this);
|
if(UiManager.Instance == null)
|
||||||
|
return;
|
||||||
|
if (IsOpened)
|
||||||
|
UiManager.Instance.OnWindowClosed(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnValidate()
|
private void OnValidate()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user