Skip to content

Commit 7407a46

Browse files
authored
fix: IDE error: Cannot read field "x" because "nd" is null (#149)
1 parent 855a24e commit 7407a46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/crowdin/ui/tree/CellRenderer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ public class CellRenderer extends DefaultTreeCellRenderer {
1212

1313
@Override
1414
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
15-
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
15+
var parentComponent = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
1616
CellData cellData = CellRenderer.getData(value);
1717
if (cellData == null) {
18-
return null;
18+
return parentComponent;
1919
}
2020

2121
JBLabel label = new JBLabel(cellData.getText());

0 commit comments

Comments
 (0)