aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qmlcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp')
-rw-r--r--src/qml/jsruntime/qv4qmlcontext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp
index 9411e2b8e0..144ab1b1a5 100644
--- a/src/qml/jsruntime/qv4qmlcontext.cpp
+++ b/src/qml/jsruntime/qv4qmlcontext.cpp
@@ -142,8 +142,8 @@ ReturnedValue QmlContextWrapper::get(const Managed *m, String *name, bool *hasPr
if (r.scriptIndex != -1) {
QV4::ScopedObject scripts(scope, context->importedScripts.valueRef());
return scripts->getIndexed(r.scriptIndex);
- } else if (r.type) {
- return QmlTypeWrapper::create(v4, scopeObject, *r.type);
+ } else if (r.type.isValid()) {
+ return QmlTypeWrapper::create(v4, scopeObject, r.type);
} else if (r.importNamespace) {
return QmlTypeWrapper::create(v4, scopeObject, context->imports, r.importNamespace);
}