summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-08-27 05:07:05 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-08-27 05:07:05 (GMT)
commit30f011823f0acacdfb3380a6ae52f05e2c8cdd6a (patch)
treefa4e34bc5e8fdc24c2b6f04c4be27b85bfbf165b
parent219e2fa7ace74d87fda4ed8c3a2a75005fab10b9 (diff)
downloadQt-30f011823f0acacdfb3380a6ae52f05e2c8cdd6a.zip
Qt-30f011823f0acacdfb3380a6ae52f05e2c8cdd6a.tar.gz
Qt-30f011823f0acacdfb3380a6ae52f05e2c8cdd6a.tar.bz2
Expressions should fail to evaluate if their engine has been destroyed
Changing this check to engine() checks both if the engine() exists and if the parent context exists.
-rw-r--r--src/declarative/qml/qmlexpression.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index 77463cd..845dcf6 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -315,7 +315,7 @@ QVariant QmlExpression::value()
Q_D(QmlExpression);
QVariant rv;
- if (!d->context() || (!d->sse.isValid() && d->expression.isEmpty()))
+ if (!engine() || (!d->sse.isValid() && d->expression.isEmpty()))
return rv;
#ifdef Q_ENABLE_PERFORMANCE_LOG