From fe2c0280dc8e80e3b0951d18aa20b9c2a832f043 Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Fri, 30 Jul 2021 20:39:23 +0800 Subject: [PATCH] =?UTF-8?q?cookiebug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Apis/UserApi.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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,