summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 5521633db7..835933c043 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -769,16 +769,19 @@ QQmlContextData *ExecutionEngine::callingQmlContext() const
QString CppStackFrame::source() const
{
- return v4Function->sourceFile();
+ return v4Function ? v4Function->sourceFile() : QString();
}
QString CppStackFrame::function() const
{
- return v4Function->name()->toQString();
+ return v4Function ? v4Function->name()->toQString() : QString();
}
int CppStackFrame::lineNumber() const
{
+ if (!v4Function)
+ return -1;
+
auto findLine = [](const CompiledData::CodeOffsetToLine &entry, uint offset) {
return entry.codeOffset < offset;
};