From 54dfd905a87a49161187582446c5409ea8551f58 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Thu, 21 Oct 2010 18:58:19 +0400 Subject: [PATCH] fix NPE --- .../platform-api/src/com/intellij/ui/treeStructure/Tree.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java index 4a6b17238756..4cf4e129f6ab 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java @@ -175,8 +175,8 @@ public class Tree extends JTree implements ComponentWithEmptyText, ComponentWith TreePath[] paths = getSelectionModel().getSelectionPaths(); if (paths != null) { for (TreePath each : paths) { - Rectangle selection = getPathBounds(each); - if (g.getClipBounds().intersects(selection) || g.getClipBounds().contains(selection)) { + final Rectangle selection = getPathBounds(each); + if (selection != null && (g.getClipBounds().intersects(selection) || g.getClipBounds().contains(selection))) { if (myBusy) { Rectangle busyIconBounds = myBusyIcon.getBounds(); if (selection.contains(busyIconBounds) || selection.intersects(busyIconBounds)) {