mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Fixed an NPE.
Change-Id: Ic3aa10acaf7ecd51dbed7f882cd1db93bf490e24
This commit is contained in:
parent
77a506b6b8
commit
52eb5f7b02
1 changed files with 3 additions and 0 deletions
|
@ -312,6 +312,9 @@ public class EvalTypeId extends CPPDependentEvaluation {
|
||||||
private ICPPConstructor[] getInitializerListConstructors(ICPPConstructor[] constructors, IASTNode point) {
|
private ICPPConstructor[] getInitializerListConstructors(ICPPConstructor[] constructors, IASTNode point) {
|
||||||
ICPPConstructor[] result = ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
|
ICPPConstructor[] result = ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
|
||||||
ICPPClassTemplate template = CPPVisitor.get_initializer_list(point);
|
ICPPClassTemplate template = CPPVisitor.get_initializer_list(point);
|
||||||
|
if (template == null)
|
||||||
|
return result;
|
||||||
|
|
||||||
for (ICPPConstructor ctor : constructors) {
|
for (ICPPConstructor ctor : constructors) {
|
||||||
if (ctor.getRequiredArgumentCount() <= 1) {
|
if (ctor.getRequiredArgumentCount() <= 1) {
|
||||||
IType[] parameterTypes = ctor.getType().getParameterTypes();
|
IType[] parameterTypes = ctor.getType().getParameterTypes();
|
||||||
|
|
Loading…
Add table
Reference in a new issue