summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build.cc b/src/build.cc
index ccdb37f..f14831e 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -411,7 +411,9 @@ void Plan::NodeFinished(Node* node) {
ScheduleWork(*oe);
} else {
// We do not need to build this edge, but we might need to build one of
- // its dependents.
+ // its dependents. Make sure the pool schedules it before it's finished
+ // otherwise the pool use count may be invalid.
+ (*oe)->pool()->EdgeScheduled(**oe);
EdgeFinished(*oe);
}
}