NPE
authorAnna Kozlova <Anna.Kozlova@jetbrains.com>
Thu, 17 Sep 2009 10:01:31 +0000 (14:01 +0400)
committerAnna Kozlova <Anna.Kozlova@jetbrains.com>
Thu, 17 Sep 2009 10:01:31 +0000 (14:01 +0400)
platform/lang-impl/src/com/intellij/codeInspection/ui/ProblemDescriptionNode.java

index 8a459904590ceb8fd67133b43de272853a3b1232..cfa19448cf3264e4e5ddf39b7a09dd183899ff47 100644 (file)
@@ -48,9 +48,11 @@ public class ProblemDescriptionNode extends InspectionTreeNode {
   public CommonProblemDescriptor getDescriptor() { return myDescriptor; }
 
   public Icon getIcon(boolean expanded) {
-    ProblemHighlightType problemHighlightType = ((ProblemDescriptorImpl)myDescriptor).getHighlightType();
-    if (problemHighlightType == ProblemHighlightType.ERROR) return ERROR;
-    if (problemHighlightType == ProblemHighlightType.GENERIC_ERROR_OR_WARNING) return WARNING;
+    if (myDescriptor != null) {
+      ProblemHighlightType problemHighlightType = ((ProblemDescriptorImpl)myDescriptor).getHighlightType();
+      if (problemHighlightType == ProblemHighlightType.ERROR) return ERROR;
+      if (problemHighlightType == ProblemHighlightType.GENERIC_ERROR_OR_WARNING) return WARNING;
+    }
     return INFO;
   }