summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 04:01:18 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 04:02:59 (GMT)
commit948263bf4bdfec1383f22fc0db50bafca2f8b5c8 (patch)
tree12d9f180624ddc7556b3919acc6386fb7a91eac4
parent7a092995df36cf5ae380bbebb2828ad468072efc (diff)
downloadQt-948263bf4bdfec1383f22fc0db50bafca2f8b5c8.zip
Qt-948263bf4bdfec1383f22fc0db50bafca2f8b5c8.tar.gz
Qt-948263bf4bdfec1383f22fc0db50bafca2f8b5c8.tar.bz2
Correctly handle shutdown order in the presence of QWidgets
The QWidget destructor is largely a copy of the QObject destructor. QML shutdown occurs in a slightly different order in this case.
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
index 6c5a1f7..eee72b6 100644
--- a/src/declarative/qml/qdeclarativecontext_p.h
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -174,7 +174,7 @@ public:
inline ContextGuard &operator=(QObject *obj)
{ QDeclarativeGuard<QObject>::operator=(obj); return *this; }
virtual void objectDestroyed(QObject *) {
- if (!QObjectPrivate::get(context->contextObject)->wasDeleted) bindings.notify();
+ if (context->contextObject && !QObjectPrivate::get(context->contextObject)->wasDeleted) bindings.notify();
}
QDeclarativeContextData *context;
QDeclarativeNotifier bindings;