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

Bug 140973 - Fix CCE by checking instanceof first.

This commit is contained in:
Doug Schaefer 2006-05-11 14:37:00 +00:00
parent cff21a926b
commit a63dcf8935

View file

@ -443,11 +443,13 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements
public IScope getCompositeScope() {
if( definition == null )
checkForDefinition();
if( definition != null ){
if( definition != null && definition instanceof ICPPASTCompositeTypeSpecifier ){
ICPPASTCompositeTypeSpecifier compSpec = (ICPPASTCompositeTypeSpecifier) definition.getParent();
return compSpec.getScope();
} else {
return null;
}
return null;
}
/* (non-Javadoc)