Commit 3b89c766 authored by Robert Loehning's avatar Robert Loehning

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's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent d319e668
......@@ -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,
......
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