Fixes warning: weak receiver may be unpredictably null in ARC mode [-Werror,-Wreceiver-is-weak]
This commit is contained in:
parent
f9449753ff
commit
23b8fe33ba
1 changed files with 3 additions and 1 deletions
|
|
@ -215,8 +215,10 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
|||
} else {
|
||||
__weak __typeof(&*self)weakSelf = self;
|
||||
[super setCompletionBlock:^ {
|
||||
__typeof(&*weakSelf) operation = weakSelf;
|
||||
|
||||
block();
|
||||
[weakSelf setCompletionBlock:nil];
|
||||
[operation setCompletionBlock:nil];
|
||||
}];
|
||||
}
|
||||
[self.lock unlock];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue