Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed Dec 13, 2024
1 parent 7a2ee1d commit 311c80d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/gui/entryeditor/EntryEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ private void adaptVisibleTabs() {
// the tabs give an ugly animation the looks like all tabs are shifting in from the right. In other words:
// This hack is required since tabbed.getTabs().setAll(visibleTabs) changes the order of the tabs in the editor

if (currentlyEditedEntry == null) {
return;
}

// First, remove tabs that we do not want to show
List<EntryEditorTab> toBeRemoved = allPossibleTabs.stream().filter(tab -> !tab.shouldShow(currentlyEditedEntry)).toList();
tabbed.getTabs().removeAll(toBeRemoved);
Expand Down

0 comments on commit 311c80d

Please sign in to comment.