Skip to content

Commit

Permalink
Update src/darwin/Framework/CHIP/MTRDevice.mm
Browse files Browse the repository at this point in the history
Co-authored-by: Karsten Sperling <[email protected]>
  • Loading branch information
jtung-apple and ksperling-apple authored Jun 12, 2024
1 parent 523ec27 commit da84949
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/darwin/Framework/CHIP/MTRDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,10 @@ - (BOOL)callDelegateWithBlock:(void (^)(id<MTRDeviceDelegate>))block
#ifdef DEBUG
- (BOOL)callDelegateSynchronouslyWithBlock:(void (^)(id<MTRDeviceDelegate>))block
{
if (self.delegateIsNull) {
return NO;
}

block(_delegate);
id<MTRDeviceDelegate> strongDelegate = _delegate;
VerifyOrReturnValue(strongDelegate, NO);

block(strongDelegate);

return YES;
}
Expand Down

0 comments on commit da84949

Please sign in to comment.