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