mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-124885 Prevent NPE
This commit is contained in:
+6
-2
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user