소스 검색

版本检查容错

guodong 1 년 전
부모
커밋
cb4fac688d
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -401,7 +401,9 @@ namespace GFGGame
             if (operation.Status == EOperationStatus.Succeed)
             {
                 LogUtil.LogDev($"版本对比: {GameGlobal.promotedVersion} {operation.PackageVersion}");
-                if (!operation.PackageVersion.Equals(GameGlobal.promotedVersion))
+                if (!string.IsNullOrEmpty(operation.PackageVersion) 
+                    && !string.IsNullOrEmpty(operation.PackageVersion) 
+                    && !operation.PackageVersion.Equals(GameGlobal.promotedVersion))
                 {
                     GameGlobal.promotedVersion = operation.PackageVersion;
                     AlertSystem.Show("游戏已有更新,您可以立即重启游戏获取最佳游戏体验,也可以稍后重启更新。")