Commit 364c9547 authored by Erik Verbruggen's avatar Erik Verbruggen Committed by Nikolai Kosjar

C++: fix possible null-pointer derefs.

Change-Id: Ie6a2398f3a9e5c26a9af1578e512da53a01d15f5
Reviewed-by: default avatarSergey Shambir <sergey.shambir.auto@gmail.com>
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 6344e2a0
......@@ -118,7 +118,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
connect(m_modelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
this, SLOT(onDocumentUpdated(CPlusPlus::Document::Ptr)));
if (m_highlightingSupport->requiresSemanticInfo()) {
if (m_highlightingSupport && m_highlightingSupport->requiresSemanticInfo()) {
connect(this, SIGNAL(semanticInfoUpdated(CppTools::SemanticInfo)),
this, SLOT(startHighlighting()));
}
......@@ -191,7 +191,7 @@ void CppEditorSupport::recalculateSemanticInfoDetached(bool force)
m_futureSemanticInfo = QtConcurrent::run<CppEditorSupport, void>(
&CppEditorSupport::recalculateSemanticInfoDetached_helper, this, source);
if (force && !m_highlightingSupport->requiresSemanticInfo())
if (force && m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo())
startHighlighting();
}
......@@ -212,7 +212,7 @@ void CppEditorSupport::updateDocumentNow()
} else {
m_updateDocumentTimer->stop();
if (!m_highlightingSupport->requiresSemanticInfo()) {
if (m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo()) {
startHighlighting();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment