CppEditor: Add guard in CppEditorWidget::projectPart()

All other functions using d->m_modelManager already have
such a guard so I assume it makes sense here, too.

Change-Id: Ie503d126230d266f57fceba9d9bae1b49849c7cd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Robert Loehning
2017-02-23 20:19:21 +01:00
parent d319e66811
commit 3b89c766f6

View File

@@ -484,6 +484,9 @@ ProjectPart *findProjectPartForCurrentProject(const QList<ProjectPart::Ptr> &pro
ProjectPart *CppEditorWidget::projectPart() const
{
if (!d->m_modelManager)
return 0;
auto projectParts = fetchProjectParts(d->m_modelManager, textDocument()->filePath());
return findProjectPartForCurrentProject(projectParts,