summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-21 16:15:09 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-21 16:15:09 (GMT)
commitd3f6ef8177f53968b22ba3585eef3ca2c3d5be1d (patch)
tree0edd650941d517e60c9c1f91da458133bdfb33d2
parent12689cc05936d675c8a7065cf39b8334b83f95bb (diff)
parentfda299f55dd5aeb2d075f6f5c842f75c9f559f9c (diff)
downloadQt-d3f6ef8177f53968b22ba3585eef3ca2c3d5be1d.zip
Qt-d3f6ef8177f53968b22ba3585eef3ca2c3d5be1d.tar.gz
Qt-d3f6ef8177f53968b22ba3585eef3ca2c3d5be1d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Don't crash calling QTextDocument::blockBoundingRect on invalid block
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index a1dcb63..5e59341 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -3148,7 +3148,7 @@ QRectF QTextDocumentLayoutPrivate::frameBoundingRectInternal(QTextFrame *frame)
QRectF QTextDocumentLayout::blockBoundingRect(const QTextBlock &block) const
{
Q_D(const QTextDocumentLayout);
- if (d->docPrivate->pageSize.isNull())
+ if (d->docPrivate->pageSize.isNull() || !block.isValid())
return QRectF();
d->ensureLayoutedByPosition(block.position() + block.length());
QTextFrame *frame = d->document->frameAt(block.position());