Avoid crash in case that a player is not logged in online.

This commit is contained in:
hiker 2015-11-18 08:15:22 +11:00
parent 17f588bcf2
commit 90b92419f3

View File

@ -50,8 +50,10 @@ void GameSetup::addPlayer(NetworkPlayerProfile* profile)
{
m_players.push_back(profile);
Log::info("GameSetup", "New player in the game setup. Global id : %u, "
"Race id : %d.", profile->user_profile->getID(), profile->race_id);
}
"Race id : %d.",
profile->user_profile ? profile->user_profile->getID() : -1,
profile->race_id);
} // addPlayer
//-----------------------------------------------------------------------------