Skip to content

Commit

Permalink
Fix rare crash caused by UI being updated from background thread
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoynel committed Jan 16, 2021
1 parent a806265 commit 2d0f93e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Tunes Notifier/TNTrack.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ - (void)downloadArtworkWithDelegate:(id<TNTackArtworkDownloadDelegate>)delegate

BOOL cancelled = error.domain == NSURLErrorDomain && error.code == NSURLErrorCancelled;
if (!cancelled) {
[weakSelf.delegate didFinishDownloadingArtworkForTrack:weakSelf];
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.delegate didFinishDownloadingArtworkForTrack:weakSelf];
});
}
}];

Expand Down

0 comments on commit 2d0f93e

Please sign in to comment.