aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-25 16:58:30 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-03-19 09:31:05 +0000
commitcb0276a4c1ed304103ccf59ff1c3ad1f502f396f (patch)
tree73b319142935d03c326b09f6ab6a40ac9d82c282 /src/qml
parent44ae6793c7c1e902215542289a01b6c6032516b9 (diff)
QQmlPrivate: Check for frame before setting instruction pointer
In certain corner cases there may be no stack frame available. As the setting of the IP is only used for generating better error messages, we don't have to care about that too much. Change-Id: If249b96a97a2189ef0b2e83f7a057a001a4307cd Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 4c4f39928b9b1cbd7623917d92c277ef256cf18d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index bda4954bb2..cb55c0d834 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -679,7 +679,8 @@ QJSValue QQmlPrivate::AOTCompiledContext::jsMetaType(int index) const
void QQmlPrivate::AOTCompiledContext::setInstructionPointer(int offset) const
{
- engine->handle()->currentStackFrame->instructionPointer = offset;
+ if (auto *frame = engine->handle()->currentStackFrame)
+ frame->instructionPointer = offset;
}
QT_END_NAMESPACE