Fixes warning: weak receiver may be unpredictably null in ARC mode [-Werror,-Wreceiver-is-weak]
This commit is contained in:
parent
f9449753ff
commit
23b8fe33ba
@ -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…
Reference in New Issue
Block a user