From c7ab731648b421aca7f7b2694e8248ce2469ccda Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 10 Nov 2007 21:23:22 +0000 Subject: [PATCH] Quick fix of nasty server crash which occurs when kicking from within a game. Real fix of the problem will follow. --- src/net/common/servergamethread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net/common/servergamethread.cpp b/src/net/common/servergamethread.cpp index 72dcf526..d0b1968b 100644 --- a/src/net/common/servergamethread.cpp +++ b/src/net/common/servergamethread.cpp @@ -208,7 +208,9 @@ void ServerGameThread::InternalKickPlayer(unsigned playerId) { SessionWrapper tmpSession = GetSessionManager().GetSessionByUniquePlayerId(playerId); - MoveSessionToLobby(tmpSession, NTF_NET_REMOVED_KICKED); + // Only kick if the player was found. + if (tmpSession.sessionData.get()) + MoveSessionToLobby(tmpSession, NTF_NET_REMOVED_KICKED); } PlayerDataList