aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-10 11:54:51 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-08-18 20:27:05 +0000
commit0ed9784082b1e21cd8fcc49ef4afbe52af3fdef4 (patch)
treee9888221349f2eb6876ea5c3bd6b62aa689e860d /src/qml/qml/qqmlvmemetaobject.cpp
parenteadad29f9c71135378c9b92f97e140837542a469 (diff)
Properly initialize the memberdata to undefined
This avoids running into assertions in other places. Change-Id: Ia7f9dbdccdd6d3a338845754801e881d44efebb7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 56d566687b..08c5ed4f9e 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -1119,7 +1119,10 @@ void QQmlVMEMetaObject::allocateProperties()
QQmlEngine *qml = qmlEngine(object);
Q_ASSERT(qml);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(qml->handle());
- properties.set(v4, QV4::MemberData::reallocate(v4, 0, metaData->propertyCount));
+ QV4::Heap::MemberData *data = QV4::MemberData::reallocate(v4, 0, metaData->propertyCount);
+ properties.set(v4, data);
+ for (uint i = 0; i < data->size; ++i)
+ data->data[i] = QV4::Encode::undefined();
propertiesInitialized = true;
}