diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-05-02 11:28:12 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-05-03 08:41:13 +0200 |
commit | 364c95476e3a74898bf4d0884670765bb7b9f592 (patch) | |
tree | 6ca8975f3c2f836733a8d1edade2a61dae7a3050 /src/plugins/cpptools/cpptoolseditorsupport.cpp | |
parent | 6344e2a02b84443baaff84a99fb9be90ca1fc733 (diff) | |
download | qt-creator-364c95476e3a74898bf4d0884670765bb7b9f592.tar.gz |
C++: fix possible null-pointer derefs.
Change-Id: Ie6a2398f3a9e5c26a9af1578e512da53a01d15f5
Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.cpp')
-rw-r--r-- | src/plugins/cpptools/cpptoolseditorsupport.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index f9e37b5190..08377b2fab 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -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(); } |