fix ui focus issue
authorNiki <david.roulet@uclouvain.be>
Wed, 10 Apr 2019 11:56:11 +0000 (13:56 +0200)
committerNiki <david.roulet@uclouvain.be>
Wed, 10 Apr 2019 11:56:11 +0000 (13:56 +0200)
src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java

index ffbcda37b19fbc19d62d44d43a94900fd205b001..cd98fac58525e7f92b8af0cf8e3a2c09d74b6d8e 100644 (file)
@@ -288,7 +288,7 @@ public class GuiReaderGroup extends JPanel {
                        books.get(previousIndex).setSelected(false);
                }
 
-               if (index >= 0) {
+               if (index >= 0 && !books.isEmpty()) {
                        books.get(index).setSelected(true);
                }
        }