summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlexpression.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-01-05 03:40:16 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-01-05 03:40:16 (GMT)
commit186a38c683cbec6a2a141245d5e428d85c073b8f (patch)
tree1bd2f2d52a832c342a4ed6dcf1a878cef95b8958 /src/declarative/qml/qmlexpression.cpp
parent56d5cac2f2bbee9e4e1ee6ac6ac9670926bb329f (diff)
downloadQt-186a38c683cbec6a2a141245d5e428d85c073b8f.zip
Qt-186a38c683cbec6a2a141245d5e428d85c073b8f.tar.gz
Qt-186a38c683cbec6a2a141245d5e428d85c073b8f.tar.bz2
Mark function contexts as temporary
QTBUG-5690
Diffstat (limited to 'src/declarative/qml/qmlexpression.cpp')
-rw-r--r--src/declarative/qml/qmlexpression.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index ab9f9ea..652c5f8 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -421,7 +421,12 @@ QVariant QmlExpressionPrivate::value(QObject *secondaryScope, bool *isUndefined)
Q_Q(QmlExpression);
QVariant rv;
- if (!q->engine() || (!data->sse.isValid() && data->expression.isEmpty()))
+ if (!q->engine()) {
+ qWarning("QmlExpression: Attempted to evaluate an expression in an invalid context");
+ return rv;
+ }
+
+ if (!data->sse.isValid() && data->expression.isEmpty())
return rv;
#ifdef Q_ENABLE_PERFORMANCE_LOG