فهرست منبع

Prevent pointer static cast

zhongwuzw 7 سال پیش
والد
کامیت
0990af52a0
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      SDWebImage/SDImageAPNGCoder.m

+ 2 - 2
SDWebImage/SDImageAPNGCoder.m

@@ -153,10 +153,10 @@ const CFStringRef kCGImagePropertyAPNGUnclampedDelayTime = (__bridge CFStringRef
 - (float)sd_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source {
     float frameDuration = 0.1f;
     CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil);
-    NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties;
-    if (!frameProperties) {
+    if (!cfFrameProperties) {
         return frameDuration;
     }
+    NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties;
     NSDictionary *pngProperties = frameProperties[(NSString *)kCGImagePropertyPNGDictionary];
     
     NSNumber *delayTimeUnclampedProp = pngProperties[(__bridge NSString *)kCGImagePropertyAPNGUnclampedDelayTime];