Commit 7c353a6c authored by Jan S's avatar Jan S Committed by skylot

fix(gui): unsynchronized search index creation results in NullPointerException...

fix(gui): unsynchronized search index creation results in NullPointerException upon performing search (#429)
parent 72b26639
......@@ -180,6 +180,7 @@ public class SearchDialog extends CommonSearchDialog {
.toList()
.toFlowable(), 1)
.observeOn(SwingSchedulers.edt())
.doOnError(e -> LOG.error("Error while searching: {}", e.getMessage(), e))
.subscribe(this::processSearchResults);
}
......
......@@ -23,7 +23,7 @@ public class CodeIndex<T> implements SearchIndex<T> {
}
@Override
public void put(StringRef str, T value) {
public synchronized void put(StringRef str, T value) {
if (str == null || str.length() == 0) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment