From 3f2cd27c5dfb3b450245bf1a37fc1b3414031c7c Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 11 二月 2026 11:03:58 +0800
Subject: [PATCH] 小游戏适配 资源系统改造

---
 Main/System/UIBase/UIBase.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Main/System/UIBase/UIBase.cs b/Main/System/UIBase/UIBase.cs
index 6d1fddb..6514d5e 100644
--- a/Main/System/UIBase/UIBase.cs
+++ b/Main/System/UIBase/UIBase.cs
@@ -176,6 +176,7 @@
         {
             //寤惰繜x甯у悗鍙偣鍑�,闃叉鐐瑰嚮杩囧揩绔嬪嵆鍏抽棴浜�
             await UniTask.Delay(200);
+            if (this == null) return; // destroyed during await
             btnClickEmptyClose.enabled = true;
         }
     }
@@ -208,6 +209,7 @@
     protected async void ExecuteNextFrame(Action _action)
     {
         await UniTask.DelayFrame(1);
+        if (this == null) return; // destroyed during await
         _action?.Invoke();
     }
 
@@ -422,6 +424,7 @@
     public async UniTask DelayCloseWindow(int delayTime = 30)
     {
         await UniTask.Delay(delayTime);
+        if (this == null) return; // destroyed during await
         CloseWindow();
     }
 

--
Gitblit v1.8.0