Skip to content

Commit

Permalink
fix(gui): unsynchronized search index creation results in NullPointer…
Browse files Browse the repository at this point in the history
…Exception upon performing search (#429)
  • Loading branch information
jpstotz authored and skylot committed Jan 15, 2019
1 parent 72b2663 commit 7c353a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions jadx-gui/src/main/java/jadx/gui/ui/SearchDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ private void searchFieldSubscribe() {
.toList()
.toFlowable(), 1)
.observeOn(SwingSchedulers.edt())
.doOnError(e -> LOG.error("Error while searching: {}", e.getMessage(), e))
.subscribe(this::processSearchResults);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void put(String str, T value) {
}

@Override
public void put(StringRef str, T value) {
public synchronized void put(StringRef str, T value) {
if (str == null || str.length() == 0) {
return;
}
Expand Down

0 comments on commit 7c353a6

Please sign in to comment.