Skip to content

Commit

Permalink
fix: check that the current tab is not null before closing it
Browse files Browse the repository at this point in the history
  • Loading branch information
martinctl committed Feb 29, 2024
1 parent 597828b commit fc3f037
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,11 @@ private boolean closeTabs() {
}

public boolean closeCurrentTab() {
return closeTab(getCurrentLibraryTab());
LibraryTab currentTab = getCurrentLibraryTab();
if (currentTab == null) {
return false;
}
return closeTab(currentTab);
}

public OpenDatabaseAction getOpenDatabaseAction() {
Expand Down

0 comments on commit fc3f037

Please sign in to comment.