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 {
|
} else {
|
||||||
__weak __typeof(&*self)weakSelf = self;
|
__weak __typeof(&*self)weakSelf = self;
|
||||||
[super setCompletionBlock:^ {
|
[super setCompletionBlock:^ {
|
||||||
|
__typeof(&*weakSelf) operation = weakSelf;
|
||||||
|
|
||||||
block();
|
block();
|
||||||
[weakSelf setCompletionBlock:nil];
|
[operation setCompletionBlock:nil];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
[self.lock unlock];
|
[self.lock unlock];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue