projects
/
profile
/
ivi
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aa875f
)
Return earlier if script.context() is invalid
author
Charles Yin
<charles.yin@nokia.com>
Wed, 9 May 2012 01:50:47 +0000
(11:50 +1000)
committer
Qt by Nokia
<qt-info@nokia.com>
Wed, 9 May 2012 02:36:41 +0000
(
04:36
+0200)
If script.context() is invalid, the qml expression is invalid too,
so no need to continue contructing the expression at all.
Change-Id: I5a34cf0eb1c2cc0b2bba7eed736073050f3240e9
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/qml/qml/qqmlexpression.cpp
patch
|
blob
|
history
diff --git
a/src/qml/qml/qqmlexpression.cpp
b/src/qml/qml/qqmlexpression.cpp
index
67a1195
..
c333df1
100644
(file)
--- a/
src/qml/qml/qqmlexpression.cpp
+++ b/
src/qml/qml/qqmlexpression.cpp
@@
-216,6
+216,10
@@
QQmlExpression::QQmlExpression(const QQmlScriptString &script, QObject *parent)
: QObject(*new QQmlExpressionPrivate, parent)
{
Q_D(QQmlExpression);
+
+ if (!script.context()->isValid())
+ return;
+
bool defaultConstruction = false;
int id = script.d.data()->bindingId;