Skip to content

Commit

Permalink
Fix RCTImageLoader crash - Cancel network requests from the correct q…
Browse files Browse the repository at this point in the history
…ueue

Picked from here:
26be005
  • Loading branch information
Andy Chen authored and lelandrichardson committed Feb 7, 2017
1 parent e9883fd commit 619a576
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Libraries/Image/RCTImageLoader.m
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,9 @@ - (RCTImageLoaderCancellationBlock)_loadURLRequest:(NSURLRequest *)request

// Download image
__weak __typeof(self) weakSelf = self;
__block RCTNetworkTask *task =
[networking networkTaskWithRequest:request
completionBlock:^(NSURLResponse *response, NSData *data, NSError *error) {
__block RCTNetworkTask *task = [networking networkTaskWithRequest:request
completionBlock:^(NSURLResponse *response, NSData *data, NSError *error)
{
__typeof(self) strongSelf = weakSelf;
if (!strongSelf) {
return;
Expand Down

0 comments on commit 619a576

Please sign in to comment.