Skip to content

Commit

Permalink
Fix exception when creating a new library (JabRef#6080)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Mar 8, 2020
1 parent c874080 commit 37af676
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/jabref/gui/BasePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,9 @@ public void clearAndSelect(final BibEntry bibEntry) {
*/
private void clearAndSelectFirst() {
mainTable.clearAndSelectFirst();
showAndEdit(mainTable.getSelectedEntries().get(0));
if (!mainTable.getSelectedEntries().isEmpty()) {
showAndEdit(mainTable.getSelectedEntries().get(0));
}
}

public void selectPreviousEntry() {
Expand Down

0 comments on commit 37af676

Please sign in to comment.