summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 08:24:48 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 08:24:48 (GMT)
commit978c56d47a6436fab9ab239bc81cdbf245b9ab10 (patch)
tree9f53ad0dc50407baa554644db60f19e9a9e6f011 /src
parent3e299066d0270100331973ff202209c94cf362de (diff)
downloadQt-978c56d47a6436fab9ab239bc81cdbf245b9ab10.zip
Qt-978c56d47a6436fab9ab239bc81cdbf245b9ab10.tar.gz
Qt-978c56d47a6436fab9ab239bc81cdbf245b9ab10.tar.bz2
Don't crash when QML engine is deleted
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index b397177..6a99855 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -126,7 +126,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
QDeclarativeBindingData *data = d->bindingData();
- if (!data->enabled)
+ if (!data->enabled || !data->context() || !data->context()->engine)
return;
data->addref();
@@ -148,8 +148,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
idx, a);
} else {
- QDeclarativeEnginePrivate *ep = (data->context() && data->context()->engine)?
- QDeclarativeEnginePrivate::get(data->context()->engine):0;
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context()->engine);
bool isUndefined = false;
QVariant value;