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:
parent
19af5bd03e
commit
1d97cb0d81
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
|||
2004-04-05 John Camelon
|
||||
Fixed NPE in CompleteParseASTFactory::createUsingDeclaration().
|
||||
|
||||
2004-04-05 John Camelon
|
||||
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=54029
|
||||
|
||||
|
|
|
@ -448,12 +448,14 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
ISymbol symbol = lookupQualifiedName(
|
||||
scopeToSymbol( scope), duple, references, true );
|
||||
|
||||
|
||||
IUsingDirectiveSymbol usingDirective = null;
|
||||
try {
|
||||
usingDirective = ((ASTScope)scope).getContainerSymbol().addUsingDirective( (IContainerSymbol)symbol );
|
||||
} catch (ParserSymbolTableException pste) {
|
||||
handleProblem( pste.createProblemID(), duple.toString(), startingOffset, endingOffset, startingLine );
|
||||
}
|
||||
if( symbol != null )
|
||||
try {
|
||||
usingDirective = ((ASTScope)scope).getContainerSymbol().addUsingDirective( (IContainerSymbol)symbol );
|
||||
} catch (ParserSymbolTableException pste) {
|
||||
handleProblem( pste.createProblemID(), duple.toString(), startingOffset, endingOffset, startingLine );
|
||||
}
|
||||
|
||||
return new ASTUsingDirective( scopeToSymbol(scope), usingDirective, startingOffset, startingLine, endingOffset, endingLine, references );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue