提交 7c353a6c 编写于 作者: J Jan S 提交者: skylot

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

fix(gui): unsynchronized search index creation results in NullPointerException upon performing search (#429)
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册