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

---
 Main/System/InternalAffairs/GoldRushLeader.cs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Main/System/InternalAffairs/GoldRushLeader.cs b/Main/System/InternalAffairs/GoldRushLeader.cs
index a7f346e..da73f07 100644
--- a/Main/System/InternalAffairs/GoldRushLeader.cs
+++ b/Main/System/InternalAffairs/GoldRushLeader.cs
@@ -46,6 +46,7 @@
     {
         int delayTime = Math.Max(1, (int)(waitTime * 1000));
         await UniTask.Delay(delayTime);
+        if (this == null) return; // destroyed during await
         StartLeaderMove(isBack);
     }
 
@@ -218,6 +219,7 @@
     async UniTask ForceRefreshLayout()
     {
         await UniTask.DelayFrame(2);
+        if (this == null) return; // destroyed during await
         LayoutRebuilder.ForceRebuildLayoutImmediate(leaderWord.GetComponent<RectTransform>());
     }
 }

--
Gitblit v1.8.0