EA-124885 Prevent NPE

This commit is contained in:
Vitaliy.Bibaev
2018-07-16 18:18:58 +03:00
parent 6ffd4cd3ce
commit 92fc888a6a
@@ -274,14 +274,18 @@ public class CollectionTree extends XDebuggerTree implements TraceContainer {
int topIndex = 0;
int bottomIndex = 1;
int topY = getRowBounds(rows[topIndex]).y;
Rectangle rowBounds = getRowBounds(rows[topIndex]);
if (rowBounds == null) return visibleRect;
int topY = rowBounds.y;
final Result result = new Result();
while (bottomIndex < rows.length) {
final int nextY = getRowBounds(rows[bottomIndex]).y;
while (nextY - topY > height) {
topIndex++;
topY = getRowBounds(rows[topIndex]).y;
rowBounds = getRowBounds(rows[topIndex]);
if (rowBounds == null) return visibleRect;
topY = rowBounds.y;
}
if (bottomIndex - topIndex > result.count()) {