mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Protect against an NPE.
This commit is contained in:
parent
4cf72bb41b
commit
4890e6e7e6
2 changed files with 8 additions and 2 deletions
|
@ -80,6 +80,10 @@ public class CPPFunctionSet implements ICPPTwoPhaseBinding {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the template arguments, or {@code null} if the function set doesn't represent a template
|
||||||
|
* specialization.
|
||||||
|
*/
|
||||||
public ICPPTemplateArgument[] getTemplateArguments() {
|
public ICPPTemplateArgument[] getTemplateArguments() {
|
||||||
return fTemplateArguments;
|
return fTemplateArguments;
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,8 +332,10 @@ public class EvalFunctionSet extends CPPDependentEvaluation {
|
||||||
int r = CPPTemplates.PACK_SIZE_NOT_FOUND;
|
int r = CPPTemplates.PACK_SIZE_NOT_FOUND;
|
||||||
if (fFunctionSet != null) {
|
if (fFunctionSet != null) {
|
||||||
ICPPTemplateArgument[] templateArguments = fFunctionSet.getTemplateArguments();
|
ICPPTemplateArgument[] templateArguments = fFunctionSet.getTemplateArguments();
|
||||||
for (ICPPTemplateArgument arg : templateArguments) {
|
if (templateArguments != null) {
|
||||||
r = CPPTemplates.combinePackSize(r, CPPTemplates.determinePackSize(arg, tpMap));
|
for (ICPPTemplateArgument arg : templateArguments) {
|
||||||
|
r = CPPTemplates.combinePackSize(r, CPPTemplates.determinePackSize(arg, tpMap));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Add table
Reference in a new issue