summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 09:35:30 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 09:36:45 (GMT)
commit3b8cad8be96d7791e8ca8305609d1155ec093b80 (patch)
treef3c4314baf8632a25a1d5a3767d6f8fd6514d7c3 /src/declarative/qml/qdeclarativeengine_p.h
parentf1412745126db129445a368525f7ec05b20a0885 (diff)
downloadQt-3b8cad8be96d7791e8ca8305609d1155ec093b80.zip
Qt-3b8cad8be96d7791e8ca8305609d1155ec093b80.tar.gz
Qt-3b8cad8be96d7791e8ca8305609d1155ec093b80.tar.bz2
Don't return QDeclarativeDeclarativeData for a deleting object
This was causing crashes in the qmldesigner.
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine_p.h')
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index 0359f98..d3eb583 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -238,7 +238,8 @@ public:
QHash<const QMetaObject *, QDeclarativePropertyCache *> propertyCache;
QDeclarativePropertyCache *cache(QObject *obj) {
Q_Q(QDeclarativeEngine);
- if (!obj || QObjectPrivate::get(obj)->metaObject) return 0;
+ if (!obj || QObjectPrivate::get(obj)->metaObject ||
+ QObjectPrivate::get(obj)->wasDeleted) return 0;
const QMetaObject *mo = obj->metaObject();
QDeclarativePropertyCache *rv = propertyCache.value(mo);
if (!rv) {