Explorar o código

Avoid trying to thumbnail nil image responses.

These lead to image IO errors in the console log.
Ryan Olson %!s(int64=11) %!d(string=hai) anos
pai
achega
0da49c1eb6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Classes/Network/FLEXNetworkRecorder.m

+ 1 - 1
Classes/Network/FLEXNetworkRecorder.m

@@ -173,7 +173,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
         }
 
         NSString *mimeType = transaction.response.MIMEType;
-        if ([mimeType hasPrefix:@"image/"]) {
+        if ([mimeType hasPrefix:@"image/"] && [responseBody length] > 0) {
             // Thumbnail image previews on a separate background queue
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 NSInteger maxPixelDimension = [[UIScreen mainScreen] scale] * 32.0;