This commit is contained in:
Konstantin Bulenkov
2014-02-20 12:59:20 +01:00
parent dc27b12a8e
commit f1240134b1
@@ -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);