diff --git a/plugins/stream-debugger/src/com/intellij/debugger/streams/ui/impl/CollectionTree.java b/plugins/stream-debugger/src/com/intellij/debugger/streams/ui/impl/CollectionTree.java index 882a4c59f4fb..fb2eda2f93e5 100644 --- a/plugins/stream-debugger/src/com/intellij/debugger/streams/ui/impl/CollectionTree.java +++ b/plugins/stream-debugger/src/com/intellij/debugger/streams/ui/impl/CollectionTree.java @@ -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()) {