diff --git a/worldsrv/action_login.go b/worldsrv/action_login.go index c12ddcc..1f2c66f 100644 --- a/worldsrv/action_login.go +++ b/worldsrv/action_login.go @@ -212,7 +212,10 @@ func (this *CSLoginHandler) Process(s *netlib.Session, packetid int, data interf // lss 其它连接 lss := LoginStateMgrSington.LoginFinish(csl.GetUsername(), csl.GetPlatform(), sid, ls.acc, tagkey) player := PlayerMgrSington.GetPlayerBySnId(ls.acc.SnId) - waitMatch, _ := TournamentMgr.IsMatchWaiting(player.Platform, player.SnId) + waitMatch := false + if player != nil { + waitMatch, _ = TournamentMgr.IsMatchWaiting(player.Platform, player.SnId) + } if len(lss) > 0 && (player != nil && (player.scene != nil || player.thrscene != 0 || waitMatch || TournamentMgr.IsMatching(player.SnId))) { sendSCLogin(login_proto.OpResultCode_OPRC_LoginOtherPlace) sendSCDisconnect(common.KickReason_Logining)