diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 279befb351..f35c3011d3 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1369,7 +1369,8 @@ void QQmlComponentPrivate::setInitialProperties(QV4::ExecutionEngine *engine, QV if (engine->hasException) return; - QV4::ScopedStackFrame frame(scope, qmlContext->d()); + // js modules (mjs) have no qmlContext + QV4::ScopedStackFrame frame(scope, qmlContext ? qmlContext->d() : engine->scriptContext()->d()); while (1) { name = it.nextPropertyNameAsString(val); |