1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fixed NPE in CompleteParseASTFactory.createUsingDeclaration()

This commit is contained in:
John Camelon 2004-04-05 05:24:40 +00:00
parent 19af5bd03e
commit 1d97cb0d81
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,6 @@
2004-04-05 John Camelon
Fixed NPE in CompleteParseASTFactory::createUsingDeclaration().
2004-04-05 John Camelon 2004-04-05 John Camelon
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=54029 Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=54029

View file

@ -448,12 +448,14 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
ISymbol symbol = lookupQualifiedName( ISymbol symbol = lookupQualifiedName(
scopeToSymbol( scope), duple, references, true ); scopeToSymbol( scope), duple, references, true );
IUsingDirectiveSymbol usingDirective = null; IUsingDirectiveSymbol usingDirective = null;
try { if( symbol != null )
usingDirective = ((ASTScope)scope).getContainerSymbol().addUsingDirective( (IContainerSymbol)symbol ); try {
} catch (ParserSymbolTableException pste) { usingDirective = ((ASTScope)scope).getContainerSymbol().addUsingDirective( (IContainerSymbol)symbol );
handleProblem( pste.createProblemID(), duple.toString(), startingOffset, endingOffset, startingLine ); } catch (ParserSymbolTableException pste) {
} handleProblem( pste.createProblemID(), duple.toString(), startingOffset, endingOffset, startingLine );
}
return new ASTUsingDirective( scopeToSymbol(scope), usingDirective, startingOffset, startingLine, endingOffset, endingLine, references ); return new ASTUsingDirective( scopeToSymbol(scope), usingDirective, startingOffset, startingLine, endingOffset, endingLine, references );
} }