From a4457c5778e37af14b7f9717b500e199de4e2a21 Mon Sep 17 00:00:00 2001 From: "kaetemi@users.sourceforge.net" Date: Sun, 9 May 2010 17:09:22 +0200 Subject: [PATCH] Fixed: #864 Server crash on character create when compile on win without stlport --- .../player_manager/persistent_player_data.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp b/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp index b76b2e864..7a1684432 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp @@ -321,7 +321,8 @@ static void prepareCharacterPositionForStore ( COfflineEntityState & state, cons H_AUTO(CCharacterStore);\ CFameManager::getInstance().savePlayerFame(_Id, const_cast(*_Fames));\ /* Update the current playing session duration */ \ - _LastLogStats.begin()->Duration = CTime::getSecondsSince1970() - _LastLogStats.begin()->LoginTime;\ + if (_LastLogStats.size() > 0) _LastLogStats.begin()->Duration = CTime::getSecondsSince1970() - _LastLogStats.begin()->LoginTime; \ + else nlwarning("Cannot update play session duration, _LastLogStats is empty, new character?"); \ \ /* Unless the top of the position stack is locked, */ \ /* update the stored position stack with the current position */ \