From d53368fd7c525da20c584cc2f490a5253a722428 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 28 Dec 2023 15:52:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/viking/model_rank.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/viking/model_rank.go b/modules/viking/model_rank.go index a3436a726..3b8f482d9 100644 --- a/modules/viking/model_rank.go +++ b/modules/viking/model_rank.go @@ -137,6 +137,9 @@ func (this *ModelRank) CheckRank(uid string, boosID int32, difficulty int32, lin } update := make(map[string]interface{}, 0) update["uinfo"] = record.Uinfo + if record.Data == nil { + record.Data = make(map[int32]*pb.ScoreData) + } if _, ok := record.Data[boosID]; !ok { record.Data[boosID] = &pb.ScoreData{ Costime: map[int32]int32{},