Skip to content

Commit

Permalink
Fixes #3505: Another try to fix the NPE in the search bar (#3512)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Dec 13, 2017
1 parent 373368a commit 47226fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/jabref/gui/search/GlobalSearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import javafx.scene.text.TextFlow;

import org.jabref.Globals;
import org.jabref.gui.AbstractView;
import org.jabref.gui.BasePanel;
import org.jabref.gui.GUIGlobals;
import org.jabref.gui.IconTheme;
Expand Down Expand Up @@ -187,7 +188,7 @@ public void actionPerformed(ActionEvent e) {
container = OS.LINUX ? new CustomJFXPanel() : new JFXPanel();
DefaultTaskExecutor.runInJavaFXThread(() -> {
Scene scene = new Scene(searchField);
scene.getStylesheets().add(GlobalSearchBar.class.getResource("../Main.css").toExternalForm());
scene.getStylesheets().add(AbstractView.class.getResource("Main.css").toExternalForm());
container.setScene(scene);
container.addKeyListener(new SearchKeyAdapter());
});
Expand Down

0 comments on commit 47226fd

Please sign in to comment.