Skip to content

Commit

Permalink
Merge pull request JabRef#10630 from JabRef/fixDoiIdentiferLookup
Browse files Browse the repository at this point in the history
Fix NPE in lookup identifer
  • Loading branch information
Siedlerchr authored Nov 10, 2023
2 parents 8a800e6 + 93a1c0f commit f4a44ba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class IdentifierEditor extends HBox implements FieldEditorFX {
@Inject private UndoManager undoManager;
@Inject private StateManager stateManager;

private Optional<BibEntry> entry;
private Optional<BibEntry> entry = Optional.empty();

public IdentifierEditor(Field field,
SuggestionProvider<?> suggestionProvider,
Expand Down Expand Up @@ -96,6 +96,7 @@ public BaseIdentifierEditorViewModel<?> getViewModel() {

@Override
public void bindToEntry(BibEntry entry) {
this.entry = Optional.of(entry);
viewModel.bindToEntry(entry);
}

Expand Down

0 comments on commit f4a44ba

Please sign in to comment.