diff options
Diffstat (limited to 'src/qml/jsruntime/qv4jscall_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4jscall_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h index 014b0473a5..900ff7d2af 100644 --- a/src/qml/jsruntime/qv4jscall_p.h +++ b/src/qml/jsruntime/qv4jscall_p.h @@ -104,8 +104,12 @@ struct ScopedStackFrame ScopedStackFrame(const Scope &scope, ExecutionContext *context) : engine(scope.engine) { - frame.init(engine->currentStackFrame ? engine->currentStackFrame->v4Function : nullptr, - nullptr, context, nullptr, nullptr, 0); + if (auto currentFrame = engine->currentStackFrame) { + frame.init(currentFrame->v4Function, nullptr, context, nullptr, nullptr, 0); + frame.instructionPointer = currentFrame->instructionPointer; + } else { + frame.init(nullptr, nullptr, context, nullptr, nullptr, 0); + } frame.push(engine); } |