diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-02 09:27:57 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-07 06:30:04 (GMT) |
commit | e0560bcaa3703fafccc21dd709731341a123a0e4 (patch) | |
tree | 5e124735a8edf8e09290f0b6855e7f11726d7fba /src | |
parent | b78d46626aa3fd34009063fc0d870cf528119af5 (diff) | |
download | Qt-e0560bcaa3703fafccc21dd709731341a123a0e4.zip Qt-e0560bcaa3703fafccc21dd709731341a123a0e4.tar.gz Qt-e0560bcaa3703fafccc21dd709731341a123a0e4.tar.bz2 |
Works around a crash in q3richtext.
Full fix will potentially break other code and is thus avoided
Task-number: 248992
Reviewed-by: Trond
Diffstat (limited to 'src')
-rw-r--r-- | src/qt3support/text/q3richtext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp index c058e37..e508001 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -4895,7 +4895,8 @@ void Q3TextParagraph::drawString(QPainter &painter, const QString &str, int star bool extendRight = false; bool extendLeft = false; bool selWrap = (real_selEnd == length()-1 && n && n->hasSelection(it.key())); - if (selWrap || this->str->at(real_selEnd).lineStart) { + if (selWrap + || ((real_selEnd < this->str->length()) && this->str->at(real_selEnd).lineStart)) { extendRight = (fullSelectionWidth != 0); if (!extendRight && !rightToLeft) tmpw += painter.fontMetrics().width(QLatin1Char(' ')); |