diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverFunction.java index 96c5d3e8fd0dfa..154e0d0daa62b2 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverFunction.java @@ -218,7 +218,9 @@ private static void declareDependenciesAndCheckValues( Environment env, Iterable skyKeys) throws InterruptedException { SkyframeIterableResult result = env.getOrderedValuesAndExceptions(skyKeys); while (result.hasNext()) { - result.next(); + if (result.next() == null) { + return; + } } }