diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-02 09:35:30 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-02 09:36:45 (GMT) |
commit | 3b8cad8be96d7791e8ca8305609d1155ec093b80 (patch) | |
tree | f3c4314baf8632a25a1d5a3767d6f8fd6514d7c3 /src/declarative/qml/qdeclarativeengine_p.h | |
parent | f1412745126db129445a368525f7ec05b20a0885 (diff) | |
download | Qt-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.h | 3 |
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) { |