fix(gui): unsynchronized search index creation results in NullPointerException upon performing search (#429)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user