From 7d145bf0e1fabfcdde1502b4d20e6bbf1177986c Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 4 Sep 2010 16:43:30 +0000 Subject: [PATCH] Fixed server crash when disconnecting during login. --- src/net/common/serverlobbythread.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 2397ec72..d789c624 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1558,9 +1558,12 @@ void ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData) { SessionWrapper tmpSession = m_sessionManager.GetSessionByUniquePlayerId(playerId, true); - tmpSession.playerData->SetDBId(dbPlayerData.id); - tmpSession.playerData->SetCountry(dbPlayerData.country); - this->AuthChallenge(tmpSession, dbPlayerData.secret); + if (tmpSession.sessionData && tmpSession.playerData) + { + tmpSession.playerData->SetDBId(dbPlayerData.id); + tmpSession.playerData->SetCountry(dbPlayerData.country); + this->AuthChallenge(tmpSession, dbPlayerData.secret); + } } void