aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qmlcontext.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-18 13:37:02 +0100
committerLiang Qi <liang.qi@qt.io>2018-02-18 13:37:02 +0100
commitba05397ad723fa19125eb5ca2f91c7f437b21484 (patch)
treee236df3317828f02ec1e8f28d87125bcc286b2d9 /src/qml/jsruntime/qv4qmlcontext.cpp
parentb2c71d6518143b3d2a9bd3aef1d72ee5929891fc (diff)
parent0e64bd96fbf26855a65e38847083dbd2c6bee4ac (diff)
Merge remote-tracking branch 'origin/5.9' into 5.11
Conflicts: .qmake.conf tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp Change-Id: I7feb9772fc35066f56b7c073482b53ca8c86c70b
Diffstat (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp')
-rw-r--r--src/qml/jsruntime/qv4qmlcontext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp
index 9c33966cf7..cf4ef68bc0 100644
--- a/src/qml/jsruntime/qv4qmlcontext.cpp
+++ b/src/qml/jsruntime/qv4qmlcontext.cpp
@@ -138,7 +138,9 @@ ReturnedValue QQmlContextWrapper::get(const Managed *m, String *name, bool *hasP
*hasProperty = true;
if (r.scriptIndex != -1) {
QV4::ScopedObject scripts(scope, context->importedScripts.valueRef());
- return scripts->getIndexed(r.scriptIndex);
+ if (scripts)
+ return scripts->getIndexed(r.scriptIndex);
+ return QV4::Encode::null();
} else if (r.type.isValid()) {
return QQmlTypeWrapper::create(v4, scopeObject, r.type);
} else if (r.importNamespace) {