Less yellow code.
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Thu, 19 May 2011 13:12:48 +0000 (17:12 +0400)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Thu, 19 May 2011 13:30:50 +0000 (17:30 +0400)
platform/lang-impl/src/com/intellij/ide/actions/RelatedItemLineMarkerGotoAdapter.java

index b1e0e71d1b0763433040dfd55c42a251c5de3698..a701e8133062b01bf171b83c7425e253781103b4 100644 (file)
@@ -74,7 +74,9 @@ public class RelatedItemLineMarkerGotoAdapter extends GotoRelatedProvider {
             continue;
           }
         }
-        ContainerUtil.addIfNotNull(element.getContainingFile(), addedFiles);
+        if (element != null) {
+          ContainerUtil.addIfNotNull(element.getContainingFile(), addedFiles);
+        }
         result.add(item);
       }
     }