diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-14 16:00:36 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-15 17:33:48 +0100 |
commit | 156508dbc058e8d43106afb19d1dee50f5d65b93 (patch) | |
tree | 30056c2779d660456755949f8edf1664efa66607 /src/qml/jsruntime | |
parent | af41170bc5e4c1be194bb9bbe883b00c2f7062b7 (diff) |
Fix crash when calling concat on an empty array
Make sure to create the array data. The earlier called copyArrayData()
doesn't have to do that.
Task-number: QTBUG-37506
Change-Id: I6671769fcd471234c4c2eaa1614aa61266db0e5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4arraydata.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index 9156a94e09..13a7bb281b 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -580,6 +580,8 @@ uint ArrayData::append(Object *obj, const ArrayObject *otherObj, uint n) if (other->isSparse()) obj->initSparseArray(); + else + obj->arrayCreate(); uint oldSize = obj->getLength(); |