diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-02-15 15:39:01 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-02-15 15:39:01 +0100 |
commit | 16ca5eab9bdd31774dc8e657f217e044640eecff (patch) | |
tree | 9bfcec84ff94fb8f817e6de20b87f86cf86d68a2 /src/qml/jsruntime/qv4arraydata.cpp | |
parent | 421dcfb5792a5ff5e5a9851e0c1edf6e87422680 (diff) |
Fix crash when changing from a simple to a sparse array
After that change, if we ran out of slots in the freeList,
the last entry would point to the first Value in the value
array, not indicating that we ran out of free slots.
Task-number: QTBUG-65828
Change-Id: I3e57bb7a0c2dc29172a485a6ea957b6ab5ac962e
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4arraydata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index 9b7251f3d0..5e971c8e9b 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -227,8 +227,8 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt sparse->values.values[i].setEmpty(); lastFree = &sparse->values.values[i].rawValueRef(); } - storeValue(lastFree, UINT_MAX); } + storeValue(lastFree, UINT_MAX); Q_ASSERT(Value::fromReturnedValue(sparse->sparse->freeList).isEmpty()); // ### Could explicitly free the old data |