]> source.dussan.org Git - aspectj.git/commitdiff
266996: fix
authoraclement <aclement>
Wed, 4 Mar 2009 17:12:43 +0000 (17:12 +0000)
committeraclement <aclement>
Wed, 4 Mar 2009 17:12:43 +0000 (17:12 +0000)
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java

index adee792fdf87f33830e7ac53d234623545a4b8cc..8dcdd5bc7728d1e412681dda007fb375162dda1f 100644 (file)
@@ -424,6 +424,9 @@ public class AspectJElementHierarchy implements IHierarchy {
         * @return any closer match below 'node' or null if nothing is a more accurate match
         */
        public IProgramElement findCloserMatchForLineNumber(IProgramElement node, int lineno) {
+               if (node == null || node.getChildren() == null) {
+                       return null;
+               }
                for (Iterator childrenIter = node.getChildren().iterator(); childrenIter.hasNext();) {
                        IProgramElement child = (IProgramElement) childrenIter.next();
                        ISourceLocation childLoc = child.getSourceLocation();