From 92a04cc4401be13f3b7f4b718c8ec5fd32e00616 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 31 May 2021 11:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8A=BD=E5=8D=A1=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8A=BD=E5=8D=A1=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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()