diff options
author | Christian Stenger <christian.stenger@digia.com> | 2012-11-26 17:41:25 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-27 13:09:17 +0100 |
commit | 777a881641675b7060f4aac27324bd0123a4a1ae (patch) | |
tree | e29e4f2652af3c693108d353b8c72bfa2d990df3 /examples/script/qsdbg/scriptdebugger.cpp | |
parent | 1d7c26ec39fdfcfb49c9fc2a5fa1938f62351df0 (diff) | |
download | qtscript-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.cpp | 3 |
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(); |