diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-07-04 11:52:45 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-07-04 17:12:47 +0200 |
commit | a47c436be9ab78589050bd404396e8d6bf420c1e (patch) | |
tree | 33e54f3166bf66d80022aaf16e5ad902aa3f26f0 /src/lib/corelib/buildgraph | |
parent | 4be1ddd7d4d70adc7ab8354a93e9d057f1163c3d (diff) |
fix crash when removing artifact
When removing an artifact we also must remove it from the outputs of the
transformer that produced it. The situation where such an artifact is
later reused only occurs in dynamic multiplex rules, which is why we
never caught this.
Task-number: QBS-640
Change-Id: I675edc1e84e04886e09a959b548c0425ed932745
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/corelib/buildgraph')
-rw-r--r-- | src/lib/corelib/buildgraph/projectbuilddata.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/projectbuilddata.cpp b/src/lib/corelib/buildgraph/projectbuilddata.cpp index f6b564d9a..abc95c8b7 100644 --- a/src/lib/corelib/buildgraph/projectbuilddata.cpp +++ b/src/lib/corelib/buildgraph/projectbuilddata.cpp @@ -280,8 +280,10 @@ void ProjectBuildData::removeArtifact(Artifact *artifact, artifact->product->unregisterAddedArtifact(artifact); disconnectArtifact(artifact, logger); - if (artifact->transformer) + if (artifact->transformer) { artifact->product->unregisterArtifactWithChangedInputs(artifact); + artifact->transformer->outputs.remove(artifact); + } isDirty = true; } |