diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 73ae5201..2ed69024 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -457,9 +457,10 @@ ServerGame::StoreLastGames() RankingMap::const_iterator i = m_rankingMap.begin(); RankingMap::const_iterator end = m_rankingMap.end(); + boost::shared_ptr tmpSession; while (i != end) { LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid); - boost::shared_ptr tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid); + tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid); if(tmpSession){ tmpSession->GetPlayerData()->AddPlayerLastGame((long)time(NULL)); LOG_ERROR("TimeStamp stored: " << tmpSession->GetPlayerData()->GetPlayerLastGames().back());