Don't crash if Format is empty.
This commit is contained in:
@@ -74,6 +74,11 @@ void PercentageDisplay::Load( const PlayerState *pPlayerState, const PlayerStage
|
|||||||
m_bApplyScoreDisplayOptions = THEME->GetMetricB( sMetricsGroup, "ApplyScoreDisplayOptions" );
|
m_bApplyScoreDisplayOptions = THEME->GetMetricB( sMetricsGroup, "ApplyScoreDisplayOptions" );
|
||||||
m_Format.SetFromExpression( THEME->GetMetric(sMetricsGroup, "Format") );
|
m_Format.SetFromExpression( THEME->GetMetric(sMetricsGroup, "Format") );
|
||||||
|
|
||||||
|
if( m_Format.IsNil() )
|
||||||
|
{
|
||||||
|
LOG->Trace( "Format is nil in [%s]. Defaulting to 'FormatPercentScore'.", sMetricsGroup.c_str() );
|
||||||
|
m_Format.SetFromExpression( "FormatPercentScore" );
|
||||||
|
}
|
||||||
|
|
||||||
if( PREFSMAN->m_bDancePointsForOni )
|
if( PREFSMAN->m_bDancePointsForOni )
|
||||||
m_textPercent.SetName( "DancePoints" + PlayerNumberToString(m_pPlayerState->m_PlayerNumber) );
|
m_textPercent.SetName( "DancePoints" + PlayerNumberToString(m_pPlayerState->m_PlayerNumber) );
|
||||||
|
|||||||
Reference in New Issue
Block a user