添加判空

This commit is contained in:
wh_zcy 2022-09-13 18:43:45 +08:00
parent fd58f469b6
commit 1829ff0754

View File

@ -68,10 +68,13 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
} }
isNewUser = true isNewUser = true
} else { } else {
if cu := this.module.modelSession.getUserSession(user.Uid); cu.SessionId != "" { if cu := this.module.modelSession.getUserSession(user.Uid); cu != nil {
code = pb.ErrorCode_UserLogined if cu.SessionId != "" {
return code = pb.ErrorCode_UserLogined
return
}
} }
} }
//bind user //bind user