fix(gui): handle null value in TableCellRenderer (#1642)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user