summaryrefslogtreecommitdiffstats
path: root/asm/src
diff options
context:
space:
mode:
Diffstat (limited to 'asm/src')
-rw-r--r--asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
index adee792fd..8dcdd5bc7 100644
--- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
+++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
@@ -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();