Advertisement
Guest User

Untitled

a guest
Mar 6th, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.90 KB | None | 0 0
  1. diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
  2. index 2b63632..99b7d98 100644
  3. --- a/src/qml/jsruntime/qv4runtime.cpp
  4. +++ b/src/qml/jsruntime/qv4runtime.cpp
  5. @@ -1245,6 +1245,8 @@ ReturnedValue __qmljs_get_id_array(NoThrowContext *ctx)
  6.  ReturnedValue __qmljs_get_context_object(NoThrowContext *ctx)
  7.  {
  8.      QQmlContextData *context = QmlContextWrapper::callingContext(ctx->engine);
  9. +    if (!context)
  10. +        return Encode::undefined();
  11.      return QObjectWrapper::wrap(ctx->engine, context->contextObject);
  12.  }
  13.  
  14. @@ -1292,6 +1294,8 @@ void __qmljs_set_qobject_property(ExecutionContext *ctx, const ValueRef object,
  15.  ReturnedValue __qmljs_get_imported_scripts(NoThrowContext *ctx)
  16.  {
  17.      QQmlContextData *context = QmlContextWrapper::callingContext(ctx->engine);
  18. +    if (!context)
  19. +        return Encode::undefined();
  20.      return context->importedScripts.value();
  21.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement