1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Bug 143093 - Check for null translationUnit. Not sure why it would be null, but whatever...

This commit is contained in:
Doug Schaefer 2006-05-25 03:05:06 +00:00
parent 0d6c0848f7
commit ce45b4750e

View file

@ -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;
}