diff options
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4jsonobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp index 4cec24ba4c..3c2624f0d8 100644 --- a/src/qml/jsruntime/qv4jsonobject.cpp +++ b/src/qml/jsruntime/qv4jsonobject.cpp @@ -915,7 +915,7 @@ ReturnedValue JsonObject::method_stringify(const FunctionObject *b, const Value if (o->isArrayObject()) { int arrayLen = scope.engine->safeForAllocLength(o->getLength()); CHECK_EXCEPTION(); - stringify.propertyList = static_cast<QV4::String *>(scope.alloc(arrayLen)); + stringify.propertyList = static_cast<QV4::String *>(scope.constructUndefined(arrayLen)); for (int i = 0; i < arrayLen; ++i) { Value *v = stringify.propertyList + i; *v = o->get(i); |
