diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-05-21 14:45:48 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-05-21 13:11:46 +0000 |
commit | 071f769e0d4998bfa5015bfa5a8c53f6b1ca2e87 (patch) | |
tree | 8b5289f8546df739b7e858173b15c02c9b95f425 | |
parent | 16404c356b0e160243de315c48975a82cc343893 (diff) |
Fix possible crash in build graph loader.
Remove products that no longer exist from the list of changed products,
so we won't try to store rescue data for them later.
Change-Id: I732d6315802fd160bbdd6defdc1b7319b6c64a81
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r-- | src/lib/corelib/buildgraph/buildgraphloader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraphloader.cpp b/src/lib/corelib/buildgraph/buildgraphloader.cpp index 9a0cdd62b..bf8223430 100644 --- a/src/lib/corelib/buildgraph/buildgraphloader.cpp +++ b/src/lib/corelib/buildgraph/buildgraphloader.cpp @@ -299,8 +299,10 @@ void BuildGraphLoader::trackProjectChanges() } // Products still left in the list do not exist anymore. - foreach (const ResolvedProductPtr &removedProduct, allRestoredProducts) + foreach (const ResolvedProductPtr &removedProduct, allRestoredProducts) { + changedProducts.removeOne(removedProduct); onProductRemoved(removedProduct, m_result.newlyResolvedProject->buildData.data()); + } // Products still left in the list need resolving, either because they are new // or because they are newly enabled. @@ -717,6 +719,7 @@ void BuildGraphLoader::rescueOldBuildData(const ResolvedProductConstPtr &restore const ResolvedProductPtr &newlyResolvedProduct, ProjectBuildData *oldBuildData, const ChildListHash &childLists, const AllRescuableArtifactData &existingRad) { + QBS_CHECK(newlyResolvedProduct); if (!restoredProduct->enabled || !newlyResolvedProduct->enabled) return; |