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

guard against NPEs, bug 102232

This commit is contained in:
Andrew Niefer 2005-07-08 17:23:20 +00:00
parent 609f1f0233
commit 4c6445634e

View file

@ -200,10 +200,12 @@ public abstract class CPPTemplateDefinition implements ICPPTemplateDefinition, I
for( ; j < length; j++ ){
template = ( j == -1 ) ? CPPTemplates.getTemplateDeclaration( definition )
: CPPTemplates.getTemplateDeclaration( declarations[j] );
if( template == null )
continue;
temp = template.getTemplateParameters()[i];
IASTName n = CPPTemplates.getTemplateParameterName( temp );
if( n != name && n.getBinding() == null ) {
if( n != null && n != name && n.getBinding() == null ) {
n.setBinding( binding );
if( binding instanceof ICPPInternalBinding )
((ICPPInternalBinding)binding).addDeclaration( n );