Fix NPE with few songs in category
This commit is contained in:
1 parent
09d36ccf60
commit
ced12ac064
4 files changed
+38
-37
No files matched your search
@@ -284,7 +284,7 @@ namespace Vocaluxe.Screens
|
||||
else
|
||||
{
|
||||
_Pos += num;
|
||||
_Pos = _Pos.Clamp(0, _Scores[_Round].Count - 1);
|
||||
_Pos = _Pos.Clamp(0, _Scores[_Round].Count - 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -396,12 +396,8 @@ namespace Vocaluxe.Screens
|
||||
|
||||
private void _ChangeRound(int num)
|
||||
{
|
||||
if (_Points.NumRounds < 1)
|
||||
return;
|
||||
_Round += num;
|
||||
_Round = _Round.Clamp(-1, _Points.NumRounds - 1);
|
||||
if (_Round >= _Points.NumRounds)
|
||||
_Round = _Points.NumRounds - 1;
|
||||
|
||||
_UpdateRatings();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user