1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix for Bug 172429 - [Content Assist] NPE in CPPTemplateScope.getParent (patch by Bryan Wilkinson)

This commit is contained in:
Anton Leherbauer 2007-02-06 12:17:08 +00:00
parent 7cf4d73796
commit 7bf2c30f75

View file

@ -67,7 +67,7 @@ public class CPPTemplateScope extends CPPScope implements ICPPTemplateScope {
public IScope getParent() {
ICPPASTTemplateDeclaration templateDecl = (ICPPASTTemplateDeclaration) getPhysicalNode();
IASTName name = CPPTemplates.getTemplateName( templateDecl );
IASTNode p = name.getParent();
IASTNode p = name != null ? name.getParent() : null;
if( p instanceof ICPPASTQualifiedName ){
ICPPASTQualifiedName qual = (ICPPASTQualifiedName) p;
IASTName [] names = qual.getNames();