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:
parent
609f1f0233
commit
4c6445634e
1 changed files with 3 additions and 1 deletions
|
@ -200,10 +200,12 @@ public abstract class CPPTemplateDefinition implements ICPPTemplateDefinition, I
|
||||||
for( ; j < length; j++ ){
|
for( ; j < length; j++ ){
|
||||||
template = ( j == -1 ) ? CPPTemplates.getTemplateDeclaration( definition )
|
template = ( j == -1 ) ? CPPTemplates.getTemplateDeclaration( definition )
|
||||||
: CPPTemplates.getTemplateDeclaration( declarations[j] );
|
: CPPTemplates.getTemplateDeclaration( declarations[j] );
|
||||||
|
if( template == null )
|
||||||
|
continue;
|
||||||
temp = template.getTemplateParameters()[i];
|
temp = template.getTemplateParameters()[i];
|
||||||
|
|
||||||
IASTName n = CPPTemplates.getTemplateParameterName( temp );
|
IASTName n = CPPTemplates.getTemplateParameterName( temp );
|
||||||
if( n != name && n.getBinding() == null ) {
|
if( n != null && n != name && n.getBinding() == null ) {
|
||||||
n.setBinding( binding );
|
n.setBinding( binding );
|
||||||
if( binding instanceof ICPPInternalBinding )
|
if( binding instanceof ICPPInternalBinding )
|
||||||
((ICPPInternalBinding)binding).addDeclaration( n );
|
((ICPPInternalBinding)binding).addDeclaration( n );
|
||||||
|
|
Loading…
Add table
Reference in a new issue