Only send back error if non-nil

This commit is contained in:
Deadpikle committed 2017-12-20 12:40:37 -05:00
1 parent 7df50ccfd3
commit 429f950434
1 file changed
+3 -1
+3 -1
View File
@@ -135,7 +135,9 @@
- (void)URLSession:(NSURLSession *)__unused session task:(NSURLSessionTask *)__unused task didCompleteWithError:(NSError *)error
{
self.download = nil;
[self.delegate downloaderDidFailWithError:error];
if (error) {
[self.delegate downloaderDidFailWithError:error];
}
[self cleanup];
}