diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index c3ac104399..1530299303 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -76,7 +76,8 @@ public: QVarLengthArray(std::initializer_list args) : a(Prealloc), s(0), ptr(reinterpret_cast(array)) { - append(args.begin(), args.size()); + if (args.size()) + append(args.begin(), args.size()); } #endif