diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-03 05:15:47 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-03 05:15:47 (GMT) |
commit | 2ef17050f740b4e0debc43f66f26f419b317b7ab (patch) | |
tree | b869fe1cfba060711345a0af0013879ae2a8bae5 /src | |
parent | fdc857a176cf86970981e6d3c814725ca674b307 (diff) | |
download | Qt-2ef17050f740b4e0debc43f66f26f419b317b7ab.zip Qt-2ef17050f740b4e0debc43f66f26f419b317b7ab.tar.gz Qt-2ef17050f740b4e0debc43f66f26f419b317b7ab.tar.bz2 |
QDeclarativeGuard should handle objects being deleted
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativedeclarativedata_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h index a7a73bc..ae40130 100644 --- a/src/declarative/qml/qdeclarativedeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedeclarativedata_p.h @@ -120,6 +120,11 @@ public: template<class T> void QDeclarativeGuard<T>::addGuard() { + if (QObjectPrivate::get(o)->wasDeleted) { + if (prev) remGuard(); + return; + } + QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(o, true); next = data->guards; if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = &next; |