guodong 3 năm trước cách đây
mục cha
commit
1d64fca5f9

+ 5 - 2
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -129,8 +129,11 @@ namespace GFGGame
             GameGlobal.userId = 0;
             GameGlobal.userAge = 0;
             GameGlobal.skipGuide = false;
-            GameGlobal.myUnit.Dispose();
-            GameGlobal.myUnit = null;
+            if(GameGlobal.myUnit != null)
+            {
+                GameGlobal.myUnit.Dispose();
+                GameGlobal.myUnit = null;
+            }
             RoleDataHandler.StopUpdate();
             CardDataManager.Clear();
             DecomposeDataManager.Instance.Clear();