diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua index 4efede4ca6..301cde2fe3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua @@ -20,7 +20,9 @@ end function this:BindEvent() Util.AddClick(this.backBtn,function() - parent:ClosePanel() + if parent then + parent:ClosePanel() + end end) end @@ -91,7 +93,9 @@ function this:OnShow(_parent,...) this.timer = nil end this.timer = Timer.New(function() - parent:ClosePanel() + if parent then + parent:ClosePanel() + end end,2):Start() end @@ -100,7 +104,9 @@ function this:OnClose() this.timer:Stop() this.timer = nil end - parent:ClosePanel() + if parent then + parent:ClosePanel() + end end function this:OnDestroy()