Skip to content

Commit f44363e

Browse files
tjgqcopybara-github
authored andcommitted
Prevent NPE on a null ActionOwner.
PiperOrigin-RevId: 829423373 Change-Id: I410165513abfa19846b89990c1988832878ade80
1 parent 1cdafcf commit f44363e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/google/devtools/build/lib/remote/AbstractActionInputPrefetcher.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ public ListenableFuture<Void> prefetchFilesInterruptibly(
317317
// Source artifacts in the main repo don't need to be fetched.
318318
if (input instanceof Artifact artifact
319319
&& artifact.isSourceArtifact()
320-
&& artifact.getArtifactOwner().getLabel().getRepository().isMain()) {
320+
&& (artifact.getArtifactOwner() == null
321+
|| artifact.getArtifactOwner().getLabel().getRepository().isMain())) {
321322
continue;
322323
}
323324

0 commit comments

Comments
 (0)