Skip to content

Commit

Permalink
Fix an issue opening console from menu
Browse files Browse the repository at this point in the history
The change fixes an issue where opening the console at the current library caused a null reference exception. The original error occurred due to an explicit null value being passed into the action's constructor. The fix supplies the correct database to the action when called.

See: JabRef#8466
  • Loading branch information
RyanEubank committed Feb 1, 2022
1 parent 2614890 commit 89bf361
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

- We fixed an issue where an exception could occur when saving the preferences [#7614](https://github.com/JabRef/jabref/issues/7614)
- We fixed an issue where "Copy DOI url" in the right-click menu of the Entry List would just copy the DOI and not the DOI url. [#8389](https://github.com/JabRef/jabref/issues/8389)
- We fixed an issue where opening the console from the drop-down menu would cause an exception. [#8466]
(https://github.com/JabRef/jabref/issues/8466)

### Removed

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/OpenConsoleAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public OpenConsoleAction(Supplier<BibDatabaseContext> databaseContext, StateMana
* Using this constructor will result in executing the command on the active database
*/
public OpenConsoleAction(StateManager stateManager, PreferencesService preferencesService) {
this(null, stateManager, preferencesService);
this(() -> stateManager.getActiveDatabase().get(), stateManager, preferencesService);
}

@Override
Expand Down

0 comments on commit 89bf361

Please sign in to comment.