From a4a2571aa78c05d5f87c9bf12a4607ce25076a4f Mon Sep 17 00:00:00 2001 From: anna Date: Mon, 4 Oct 2010 13:56:31 +0400 Subject: [PATCH] NPE --- .../ui/SingleInspectionProfilePanel.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java index a5e9677c2203..5defd085dcdf 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java @@ -540,12 +540,14 @@ public class SingleInspectionProfilePanel extends JPanel { public void treeExpanded(TreeExpansionEvent event) { InspectionProfileImpl selected = mySelectedProfile; - String nodeTitle = getExpandedString(event.getPath()); - final InspectionProfileImpl parentProfile = (InspectionProfileImpl)selected.getParentProfile(); - if (parentProfile != null) { - parentProfile.getExpandedNodes().expandNode(nodeTitle); + if (selected != null) { + String nodeTitle = getExpandedString(event.getPath()); + final InspectionProfileImpl parentProfile = (InspectionProfileImpl)selected.getParentProfile(); + if (parentProfile != null) { + parentProfile.getExpandedNodes().expandNode(nodeTitle); + } + selected.getExpandedNodes().expandNode(nodeTitle); } - selected.getExpandedNodes().expandNode(nodeTitle); } });