Merge pull request #1104 from pollarm/master
Fix parenthesis to avoid crashes
This commit is contained in:
commit
704c630567
|
@ -206,7 +206,7 @@ NSString *const SDWebImageDownloadFinishNotification = @"SDWebImageDownloadFinis
|
||||||
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
|
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
|
||||||
|
|
||||||
//'304 Not Modified' is an exceptional one
|
//'304 Not Modified' is an exceptional one
|
||||||
if ((![response respondsToSelector:@selector(statusCode)] || [((NSHTTPURLResponse *)response) statusCode] < 400) && [((NSHTTPURLResponse *)response) statusCode] != 304) {
|
if (![response respondsToSelector:@selector(statusCode)] || ([((NSHTTPURLResponse *)response) statusCode] < 400 && [((NSHTTPURLResponse *)response) statusCode] != 304)) {
|
||||||
NSInteger expected = response.expectedContentLength > 0 ? (NSInteger)response.expectedContentLength : 0;
|
NSInteger expected = response.expectedContentLength > 0 ? (NSInteger)response.expectedContentLength : 0;
|
||||||
self.expectedSize = expected;
|
self.expectedSize = expected;
|
||||||
if (self.progressBlock) {
|
if (self.progressBlock) {
|
||||||
|
|
Loading…
Reference in New Issue