diff --git a/src/plugins/texteditor/generichighlighter/specificrules.cpp b/src/plugins/texteditor/generichighlighter/specificrules.cpp index c24a4391eb7..02e5ed42303 100644 --- a/src/plugins/texteditor/generichighlighter/specificrules.cpp +++ b/src/plugins/texteditor/generichighlighter/specificrules.cpp @@ -265,6 +265,9 @@ bool KeywordRule::doMatchSucceed(const QString &text, const int length, ProgressData *progress) { + if (m_list.isNull()) // Happens if a keyword rule points to a none existing keyword list + return false; + int current = progress->offset(); if (current > 0 && !definition()->isDelimiter(text.at(current - 1)))