diff options
Diffstat (limited to 'asm')
-rw-r--r-- | asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index ec48fdd5f..26bf3f4b0 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -136,7 +136,10 @@ public class AspectJElementHierarchy implements IHierarchy { if (packageName == null) { packageNode = root; } else { - for (Iterator it = root.getChildren().iterator(); it.hasNext(); ) { + if (root == null) return null; + List kids = root.getChildren(); + if (kids == null) return null; + for (Iterator it = kids.iterator(); it.hasNext(); ) { IProgramElement node = (IProgramElement)it.next(); if (packageName.equals(node.getName())) { packageNode = node; |