forked from qt-creator/qt-creator
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:
@@ -484,6 +484,9 @@ ProjectPart *findProjectPartForCurrentProject(const QList<ProjectPart::Ptr> &pro
|
|||||||
|
|
||||||
ProjectPart *CppEditorWidget::projectPart() const
|
ProjectPart *CppEditorWidget::projectPart() const
|
||||||
{
|
{
|
||||||
|
if (!d->m_modelManager)
|
||||||
|
return 0;
|
||||||
|
|
||||||
auto projectParts = fetchProjectParts(d->m_modelManager, textDocument()->filePath());
|
auto projectParts = fetchProjectParts(d->m_modelManager, textDocument()->filePath());
|
||||||
|
|
||||||
return findProjectPartForCurrentProject(projectParts,
|
return findProjectPartForCurrentProject(projectParts,
|
||||||
|
|||||||
Reference in New Issue
Block a user