fix: exception when switching to a gamelist view that contains less than 10 games
This commit is contained in:
parent
2234c8582d
commit
eee736d8d4
2
pom.xml
2
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue