summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2010-03-01 13:43:28 (GMT)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-03-02 09:59:13 (GMT)
commit667ef5950bc16ff8582ac32f5150fc9f45a09682 (patch)
tree025bed06ff584bcd24c36142012decfb02015d7c
parent6d51c7b9d1f6700564ec9e3c3f7b41b6b94a74da (diff)
downloadQt-667ef5950bc16ff8582ac32f5150fc9f45a09682.zip
Qt-667ef5950bc16ff8582ac32f5150fc9f45a09682.tar.gz
Qt-667ef5950bc16ff8582ac32f5150fc9f45a09682.tar.bz2
don't even try to rehighlight invalid or alien block
Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index b5a7aa1..de16ca5 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -399,7 +399,7 @@ void QSyntaxHighlighter::rehighlight()
void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block)
{
Q_D(QSyntaxHighlighter);
- if (!d->doc)
+ if (!d->doc || !block.isValid() || block.document() != d->doc)
return;
const bool rehighlightPending = d->rehighlightPending;