summaryrefslogtreecommitdiff
path: root/src/declarative/util/qdeclarativeopenmetaobject.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-29 13:47:45 +1000
committerMichael Brasser <michael.brasser@nokia.com>2010-03-29 13:49:35 +1000
commite011539844e6702e02770362a95d9b969643a9df (patch)
treefe5d4650b7f934cd846f76255fb4db22a938f98d /src/declarative/util/qdeclarativeopenmetaobject.cpp
parent593f551d6718343f80b5497de58eb80566ea7908 (diff)
downloadqt4-tools-e011539844e6702e02770362a95d9b969643a9df.tar.gz
Fix crash in QDeclarativePropertyMap.
Task-number: QTBUG-9439
Diffstat (limited to 'src/declarative/util/qdeclarativeopenmetaobject.cpp')
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp
index 70ecf95920..6611885ce6 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject.cpp
+++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp
@@ -222,7 +222,7 @@ int QDeclarativeOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
propertyRead(propId);
*reinterpret_cast<QVariant *>(a[0]) = d->getData(propId);
} else if (c == QMetaObject::WriteProperty) {
- if (d->data[propId].first != *reinterpret_cast<QVariant *>(a[0])) {
+ if (propId <= d->data.count() || d->data[propId].first != *reinterpret_cast<QVariant *>(a[0])) {
propertyWrite(propId);
d->writeData(propId, *reinterpret_cast<QVariant *>(a[0]));
propertyWritten(propId);