diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-05-13 00:08:48 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-05-13 00:08:48 (GMT) |
commit | 386b658ce39bfab16ea14b232c61ad4703f11619 (patch) | |
tree | d68d6fbf210464dfd7ce78e22c0fabc9e1537a40 /src/declarative | |
parent | 7894bbb901a2ba74284bd6c0544b06c6a41f6b6f (diff) | |
download | Qt-386b658ce39bfab16ea14b232c61ad4703f11619.zip Qt-386b658ce39bfab16ea14b232c61ad4703f11619.tar.gz Qt-386b658ce39bfab16ea14b232c61ad4703f11619.tar.bz2 |
Fix broken benchmarks.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 9f5cafe..94e6771 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -327,11 +327,12 @@ Q_GLOBAL_STATIC(QDeclarativeEngineDebugServer, qmlEngineDebugServer); void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o) { QObjectPrivate *p = QObjectPrivate::get(o); - Q_ASSERT(p->declarativeData); - QDeclarativeData *d = static_cast<QDeclarativeData*>(p->declarativeData); - if (d->ownContext && d->context) { - d->context->destroy(); - d->context = 0; + if (p->declarativeData) { + QDeclarativeData *d = static_cast<QDeclarativeData*>(p->declarativeData); + if (d->ownContext && d->context) { + d->context->destroy(); + d->context = 0; + } } } |