Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
- index 2b63632..99b7d98 100644
- --- a/src/qml/jsruntime/qv4runtime.cpp
- +++ b/src/qml/jsruntime/qv4runtime.cpp
- @@ -1245,6 +1245,8 @@ ReturnedValue __qmljs_get_id_array(NoThrowContext *ctx)
- ReturnedValue __qmljs_get_context_object(NoThrowContext *ctx)
- {
- QQmlContextData *context = QmlContextWrapper::callingContext(ctx->engine);
- + if (!context)
- + return Encode::undefined();
- return QObjectWrapper::wrap(ctx->engine, context->contextObject);
- }
- @@ -1292,6 +1294,8 @@ void __qmljs_set_qobject_property(ExecutionContext *ctx, const ValueRef object,
- ReturnedValue __qmljs_get_imported_scripts(NoThrowContext *ctx)
- {
- QQmlContextData *context = QmlContextWrapper::callingContext(ctx->engine);
- + if (!context)
- + return Encode::undefined();
- return context->importedScripts.value();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement