diff options
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 282046f3fa..fb002ec48d 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -71,8 +71,13 @@ Heap::CallContext *ExecutionContext::newBlockContext(CppStackFrame *frame, int b Heap::ExecutionContext *outer = static_cast<Heap::ExecutionContext *>(frame->context()->m()); c->outer.set(v4, outer); - c->function.set(v4, static_cast<Heap::FunctionObject *>( - Value::fromStaticValue(frame->jsFrame->function).m())); + if (frame->isJSTypesFrame()) { + c->function.set(v4, static_cast<Heap::FunctionObject *>( + Value::fromStaticValue( + static_cast<JSTypesStackFrame *>(frame)->jsFrame->function).m())); + } else { + c->function.set(v4, nullptr); + } c->locals.size = nLocals; c->locals.alloc = nLocals; |