未验证 提交 cf7767e7 编写于 作者: S Skylot

fix(gui): handle null value in TableCellRenderer (#1642)

上级 e0aedc79
......@@ -420,6 +420,9 @@ public abstract class CommonSearchDialog extends JFrame {
@Override
public Component getTableCellRendererComponent(JTable table, Object obj,
boolean isSelected, boolean hasFocus, int row, int column) {
if (obj == null || table == null) {
return emptyLabel;
}
Component comp = makeCell((JNode) obj, column);
updateSelection(table, comp, column, isSelected);
return comp;
......
......@@ -553,6 +553,7 @@ public class SearchDialog extends CommonSearchDialog {
}
private void addSearchResult(JNode node) {
Objects.requireNonNull(node);
synchronized (pendingResults) {
UiUtils.notUiThreadGuard();
pendingResults.add(node);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册