Merge pull request #3401 from dreampiggy/fix_unlock_unbalanced

Fix the unbalanced lock which cause crash
This commit is contained in:
DreamPiggy 2022-09-19 14:30:03 +08:00 committed by GitHub
commit d3b111deb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -824,6 +824,7 @@ static id<SDImageLoader> _defaultImageLoader;
- (void)cancel {
SD_LOCK(_cancelledLock);
if (_cancelled) {
SD_UNLOCK(_cancelledLock);
return;
}
_cancelled = YES;