Skip to content

Commit

Permalink
Fix case where we forget to unlock in ASNetworkImagenode (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adlai-Holler authored and garrettmoon committed Apr 27, 2017
1 parent 399bfac commit 7ebdec8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Source/ASNetworkImageNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ - (void)didEnterPreloadState

- (void)handleProgressImage:(UIImage *)progressImage progress:(CGFloat)progress downloadIdentifier:(nullable id)downloadIdentifier
{
__instanceLock__.lock();
ASDN::MutexLocker l(__instanceLock__);

// Getting a result back for a different download identifier, download must not have been successfully canceled
if (ASObjectIsEqual(_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) {
Expand All @@ -412,8 +412,6 @@ - (void)handleProgressImage:(UIImage *)progressImage progress:(CGFloat)progress

[self _locked_setCurrentImageQuality:progress];
[self _locked__setImage:progressImage];

__instanceLock__.unlock();
}

- (void)_updateProgressImageBlockOnDownloaderIfNeeded
Expand Down

0 comments on commit 7ebdec8

Please sign in to comment.