fix null dereference in non-course
This commit is contained in:
@@ -179,7 +179,7 @@ XNode* MakeRecentScoreNode( const StageStats &ss, Trail *pTrail, const PlayerSta
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XNode* pNode = new XNode( "HighScoreForASongAndSteps" );
|
pNode = new XNode( "HighScoreForASongAndSteps" );
|
||||||
|
|
||||||
SongID songID;
|
SongID songID;
|
||||||
songID.FromSong( ss.m_vpPossibleSongs[0] );
|
songID.FromSong( ss.m_vpPossibleSongs[0] );
|
||||||
@@ -261,12 +261,15 @@ void StatsManager::CommitStatsToProfiles( const StageStats *pSS )
|
|||||||
recent = xml->AppendChild( new XNode("RecentSongScores") );
|
recent = xml->AppendChild( new XNode("RecentSongScores") );
|
||||||
|
|
||||||
if(!GAMESTATE->m_bMultiplayer)
|
if(!GAMESTATE->m_bMultiplayer)
|
||||||
|
{
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_HumanPlayer( p )
|
||||||
recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[p], pSS->m_player[p], MultiPlayer_Invalid ) );
|
recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[p], pSS->m_player[p], MultiPlayer_Invalid ) );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
FOREACH_EnabledMultiPlayer( mp )
|
FOREACH_EnabledMultiPlayer( mp )
|
||||||
recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber], pSS->m_multiPlayer[mp], mp ) );
|
recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber], pSS->m_multiPlayer[mp], mp ) );
|
||||||
|
}
|
||||||
|
|
||||||
RString sDate = DateTime::GetNowDate().GetString();
|
RString sDate = DateTime::GetNowDate().GetString();
|
||||||
sDate.Replace(":","-");
|
sDate.Replace(":","-");
|
||||||
|
|||||||
Reference in New Issue
Block a user