NULL check

This commit is contained in:
Kai Philipp
2019-09-13 18:24:44 +02:00
parent 2f4492a4af
commit 4c30f251f0
+7 -7
View File
@@ -1812,13 +1812,13 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
tmpSession->GetPlayerData()->SetDBId(dbPlayerData.id); tmpSession->GetPlayerData()->SetDBId(dbPlayerData.id);
tmpSession->GetPlayerData()->SetCountry(dbPlayerData.country); tmpSession->GetPlayerData()->SetCountry(dbPlayerData.country);
LOG_ERROR("last_games from db = " << dbPlayerData.last_games); LOG_ERROR("last_games from db = " << dbPlayerData.last_games);
// std::vector<long> last_games; std::vector<long> last_games;
// std::stringstream ss(dbPlayerData.last_games); std::stringstream ss(dbPlayerData.last_games);
// for (string i; ss >> i;) { for (string i; ss >> i;) {
// last_games.push_back(stol(i)); last_games.push_back(tol(i));
// if (ss.peek() == ',') if (ss.peek() == ',')
// ss.ignore(); ss.ignore();
// } }
//tmpSession->GetPlayerData()->SetPlayerLastGames(last_games); //tmpSession->GetPlayerData()->SetPlayerLastGames(last_games);
//LOG_ERROR("last_games first from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().front()); //LOG_ERROR("last_games first from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().front());
this->AuthChallenge(tmpSession, dbPlayerData.secret); this->AuthChallenge(tmpSession, dbPlayerData.secret);