浏览代码

版本检查容错

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("游戏已有更新,您可以立即重启游戏获取最佳游戏体验,也可以稍后重启更新。")