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); } });