Fix crash if there are no songs in highscore

This commit is contained in:
Flamefire committed 2014-03-11 22:54:24 +01:00
1 parent 76f491b347
commit 424cb826ed
1 file changed
+7 -2
+7 -2
View File
@@ -279,8 +279,13 @@ namespace Vocaluxe.Screens
private void _ChangePos(int num)
{
_Pos += num;
_Pos = _Pos.Clamp(0, _Scores[_Round].Count - 1);
if (_Scores[_Round].Count == 0)
_Pos = 0;
else
{
_Pos += num;
_Pos = _Pos.Clamp(0, _Scores[_Round].Count - 1);
}
}
private void _ChangeRound(int num)