From 97a6d363e7fd8af0cae84f9ef2cf7fdcecc386e5 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 18 Sep 2024 10:58:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=88=A4=E6=96=AD=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E6=98=AF=E5=90=A6=E5=9C=A8=E6=AF=94=E8=B5=9B=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_login.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)