diff --git a/Assets/Scripts/Apis/UserApi.cs b/Assets/Scripts/Apis/UserApi.cs index f04fd7b6..17ad08ef 100644 --- a/Assets/Scripts/Apis/UserApi.cs +++ b/Assets/Scripts/Apis/UserApi.cs @@ -248,7 +248,14 @@ namespace Assets.Scripts.Apis } public JsonResult Update(UserResultModel currUser, out string cookie, string filePath = "") { - cookie = App.CurrentUser.cookie; + if (App.CurrentUser != null) + { + cookie = App.CurrentUser.cookie; + } + else + { + cookie = null; + } //return await PostAsync>("User/UpdateUserSetting", new { // UID = currUser.Id, // Sex = currUser.Sex,