Explorar el Código

Avoid trying to thumbnail nil image responses.

These lead to image IO errors in the console log.
Ryan Olson hace 11 años
padre
commit
0da49c1eb6
Se han modificado 1 ficheros con 1 adiciones y 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;