aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/inputartifactscanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/buildgraph/inputartifactscanner.cpp')
-rw-r--r--src/lib/corelib/buildgraph/inputartifactscanner.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/corelib/buildgraph/inputartifactscanner.cpp b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
index b9fb6fea5..0f6161235 100644
--- a/src/lib/corelib/buildgraph/inputartifactscanner.cpp
+++ b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
@@ -311,14 +311,18 @@ unresolved:
continue;
resolved:
- // Do not scan artifacts that are being built. Otherwise we might read an incomplete
- // file or conflict with the writing process.
- if (artifactsToScan) {
- Artifact *artifactDependency = dynamic_cast<Artifact *>(resolvedDependency->file);
- if (artifactDependency && artifactDependency->buildState != BuildGraphNode::Building)
- artifactsToScan->append(artifactDependency);
- }
handleDependency(*resolvedDependency);
+ if (artifactsToScan && resolvedDependency->file) {
+ if (Artifact *artifactDependency = dynamic_cast<Artifact *>(resolvedDependency->file)) {
+ // Do not scan artifacts that are being built. Otherwise we might read an incomplete
+ // file or conflict with the writing process.
+ if (artifactDependency->buildState != BuildGraphNode::Building)
+ artifactsToScan->append(artifactDependency);
+ } else {
+ // Add file dependency to the next round of scanning.
+ artifactsToScan->append(resolvedDependency->file);
+ }
+ }
}
}