diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-28 00:00:37 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2019-02-28 01:47:50 +0000 |
commit | 55b464196297afc11cb9836f61f737e6fdaf04dc (patch) | |
tree | 778b67ed3f17c28e9226d4dbe90e7e22033c8c23 /src/gui/text/qsyntaxhighlighter.cpp | |
parent | 15adc79bbcaa909f43c2da3c61306cc2138567fa (diff) | |
parent | 043f99954faa8355c9f0d78d441099a6f7e1ad8b (diff) |
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13
Diffstat (limited to 'src/gui/text/qsyntaxhighlighter.cpp')
-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 0e07b69868..102a776ed3 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -297,7 +297,7 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block) QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent) : QObject(*new QSyntaxHighlighterPrivate, parent) { - if (parent->inherits("QTextEdit")) { + if (parent && parent->inherits("QTextEdit")) { QTextDocument *doc = parent->property("document").value<QTextDocument *>(); if (doc) setDocument(doc); |