diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2018-07-12 11:52:29 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2018-07-12 09:57:49 +0000 |
commit | 293e711739b7e6eb00497cce97f7cca87ba497a5 (patch) | |
tree | fe2110a59fc71ee53ff6ef8777c13cdc65125ad8 /src | |
parent | e6cfe06dfcfb0530a0d08087f3d7c59ec7b631ab (diff) |
ProjectModel: Fix crash when updating parsing state of project
Fix crash when updating the parsing state of a project during the time
between the project being removed from the session and the time when
the project is actually destroyed.
Change-Id: I54bf4793626497315fe588ebb68474b880de2984
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/projectexplorer/projectmodels.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp index 226b85e67d..cbb375da61 100644 --- a/src/plugins/projectexplorer/projectmodels.cpp +++ b/src/plugins/projectexplorer/projectmodels.cpp @@ -314,9 +314,15 @@ void FlatModel::handleProjectAdded(Project *project) QTC_ASSERT(project, return); connect(project, &Project::parsingStarted, - this, [this, project]() { parsingStateChanged(project); }); + this, [this, project]() { + if (nodeForProject(project)) + parsingStateChanged(project); + }); connect(project, &Project::parsingFinished, - this, [this, project]() { parsingStateChanged(project); }); + this, [this, project]() { + if (nodeForProject(project)) + parsingStateChanged(project); + }); addOrRebuildProjectModel(project); } |