diff options
-rw-r--r-- | lib/Sema/SemaInit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 3fae86d19d..951aaa3bc0 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -165,9 +165,9 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType, return true; // FIXME: What do do if VD is null here? - assert(VD && "Must have a var decl to construct into!"); - Init = CXXConstructExpr::Create(Context, VD, DeclType, Constructor, - false, &Init, 1); + if (VD) + Init = CXXConstructExpr::Create(Context, VD, DeclType, Constructor, + false, &Init, 1); return false; } |