From ce45b4750e8822c3f9af30282d5867535b6fb06b Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Thu, 25 May 2006 03:05:06 +0000 Subject: [PATCH] Bug 143093 - Check for null translationUnit. Not sure why it would be null, but whatever... --- .../org/eclipse/cdt/internal/core/dom/parser/ASTNode.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java index 5b06431a85c..9db66eea57e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java @@ -98,7 +98,9 @@ public abstract class ASTNode implements IASTNode { public IASTFileLocation getFileLocation() { if( fileLocation != null ) return fileLocation; - fileLocation = getTranslationUnit().flattenLocationsToFile( getNodeLocations() ); + IASTTranslationUnit ast = getTranslationUnit(); + if (ast != null) + fileLocation = ast.flattenLocationsToFile( getNodeLocations() ); return fileLocation; }