mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
NPE fix
This commit is contained in:
@@ -245,7 +245,8 @@ class UsageViewTreeCellRenderer extends ColoredTreeCellRenderer {
|
||||
}
|
||||
pref.width = Math.max(visibleRect.width, pref.width);
|
||||
myRowBoundsCalled = true;
|
||||
final Rectangle bounds = getTree().getRowBounds(row);
|
||||
final JTree tree = getTree();
|
||||
final Rectangle bounds = tree == null ? null : tree.getRowBounds(row);
|
||||
myRowBoundsCalled = false;
|
||||
int y = bounds == null ? 0 : bounds.y;
|
||||
TextRange vis = TextRange.from(Math.max(0, visibleRect.y - pref.height), visibleRect.height + pref.height * 2);
|
||||
|
||||
Reference in New Issue
Block a user