forked from qt-creator/qt-creator
C++: prevent possible nullptr deref.
Change-Id: Ibc138bcfdef4b6a5dd154e819d568398ecace982 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -148,6 +148,8 @@ unsigned SemanticHighlighter::documentRevision() const
|
||||
|
||||
void SemanticHighlighter::updateFormatMapFromFontSettings()
|
||||
{
|
||||
QTC_ASSERT(m_baseTextDocument, return);
|
||||
|
||||
const TextEditor::FontSettings &fs = m_baseTextDocument->fontSettings();
|
||||
|
||||
m_formatMap[TypeUse] = fs.toTextCharFormat(TextEditor::C_TYPE);
|
||||
|
||||
Reference in New Issue
Block a user