From 30f011823f0acacdfb3380a6ae52f05e2c8cdd6a Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 27 Aug 2009 15:07:05 +1000 Subject: 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. --- src/declarative/qml/qmlexpression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12