Browse Source

成就报错问题

huangxiaoyue 1 year ago
parent
commit
ece09ecf54
1 changed files with 2 additions and 0 deletions
  1. 2 0
      GameClient/Assets/Game/HotUpdate/Views/Task/TaskAchieveView.cs

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Task/TaskAchieveView.cs

@@ -100,6 +100,8 @@ namespace GFGGame
             listItem.target.data = index;
             listItem.target.data = index;
 
 
             var taskTypeProList = TaskDataManager.Instance.GetAchievementTaskTypeProList();
             var taskTypeProList = TaskDataManager.Instance.GetAchievementTaskTypeProList();
+            if (taskTypeProList == null)
+                return;
             foreach (var info in taskTypeProList) {
             foreach (var info in taskTypeProList) {
                 if (info.AchievementType == index+1) {
                 if (info.AchievementType == index+1) {
                     listItem.m_achieveBar.max = info.AllTaskNum;
                     listItem.m_achieveBar.max = info.AllTaskNum;