summaryrefslogtreecommitdiff
path: root/examples/script/qsdbg/scriptdebugger.cpp
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@digia.com>2012-11-26 17:41:25 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-27 13:09:17 +0100
commit777a881641675b7060f4aac27324bd0123a4a1ae (patch)
treee29e4f2652af3c693108d353b8c72bfa2d990df3 /examples/script/qsdbg/scriptdebugger.cpp
parent1d7c26ec39fdfcfb49c9fc2a5fa1938f62351df0 (diff)
downloadqtscript-777a881641675b7060f4aac27324bd0123a4a1ae.tar.gz
Fix scriptdebugger example
Task-number: QTBUG-28128 Change-Id: Ifb57fa5e5dc2fa1959e8f04861897f59d3ce635d Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'examples/script/qsdbg/scriptdebugger.cpp')
-rw-r--r--examples/script/qsdbg/scriptdebugger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/script/qsdbg/scriptdebugger.cpp b/examples/script/qsdbg/scriptdebugger.cpp
index 4517388..54aeccf 100644
--- a/examples/script/qsdbg/scriptdebugger.cpp
+++ b/examples/script/qsdbg/scriptdebugger.cpp
@@ -176,7 +176,8 @@ int ScriptInfo::lineOffset(int lineNumber)
} else {
int index;
it = m_lineOffsets.lowerBound(lineNumber);
- --it;
+ if (it != m_lineOffsets.constBegin())
+ --it;
if (it != m_lineOffsets.constBegin()) {
index = it.key();
offset = it.value();