Skip to content

Commit 239e850

Browse files
mykola-semkofacebook-github-bot
authored andcommitted
HybridLocalStrategy: NPE fix while canceling delegating job
Summary: ^ Reviewed By: cjhopman fbshipit-source-id: c5a8f0b81835e80e680ba1cb4b0a8c7b291928f8
1 parent ae5b505 commit 239e850

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/com/facebook/buck/rules/modern/builders/HybridLocalStrategy.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ public ListenableFuture<?> rescheduleLocally(Throwable reason) {
278278

279279
public boolean cancelDelegateLocked(Throwable reason) {
280280
Verify.verify(Thread.holdsLock(this));
281+
if (delegateResult == null) {
282+
LOG.debug("Nothing to cancel.");
283+
return false;
284+
}
281285

282286
StrategyBuildResult capturedDelegateResult = Objects.requireNonNull(delegateResult);
283287
if (capturedDelegateResult.getBuildResult().isDone()) {

0 commit comments

Comments
 (0)