fix: exception when switching to a gamelist view that contains less than 10 games

This commit is contained in:
lantzelot-swe 2023-12-06 12:04:31 +01:00
parent 2234c8582d
commit eee736d8d4
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>se.lantz</groupId>
<artifactId>PCUAEManager</artifactId>
<version>2.15.0</version>
<version>2.15.1</version>
<name>PCUAEManager</name>
<properties>
<project.build.sourceEncoding>Cp1252</project.build.sourceEncoding>

View File

@ -363,7 +363,7 @@ public class MainViewModel extends AbstractModel
List<GameListData> gamesInView = dbConnector.fetchGamesByView(getSelectedGameView());
int selectedGameIndex = gamesInView.indexOf(current);
if (selectedGameIndex < 0)
if (selectedGameIndex < 0 || gamesInView.size() < 10)
{
return returnList;
}