diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2010-03-01 13:43:28 (GMT) |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-03-02 09:59:13 (GMT) |
commit | 667ef5950bc16ff8582ac32f5150fc9f45a09682 (patch) | |
tree | 025bed06ff584bcd24c36142012decfb02015d7c /src/gui | |
parent | 6d51c7b9d1f6700564ec9e3c3f7b41b6b94a74da (diff) | |
download | Qt-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>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qsyntaxhighlighter.cpp | 2 |
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; |