Skip to content

Commit 7de077c

Browse files
committed
修改uimanager可能潜在的bug
1 parent 7fbcdfb commit 7de077c

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Assets/GameFramework/UI/UIManager.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,14 @@ public void Pop(bool isDestory = false)
112112
if (_stackUiAsset.Count > 0)
113113
{
114114
UIViewAttribute uiViewAttribute = _stackUiAsset.Peek();
115-
UIView lastUiView = GetUiView(uiViewAttribute);
116-
lastUiView.OnResume();
117-
118-
//触发恢复事件
119-
_uiResumeArgs.UIView = lastUiView;
120-
_event.Trigger(this, _uiResumeArgs);
115+
UIView lastUiView;
116+
if (_allUiViews.TryGetValue(uiViewAttribute, out lastUiView))
117+
{
118+
lastUiView.OnResume();
119+
//触发恢复事件
120+
_uiResumeArgs.UIView = lastUiView;
121+
_event.Trigger(this, _uiResumeArgs);
122+
}
121123
}
122124
}
123125

0 commit comments

Comments
 (0)