Prevent pointer static cast

This commit is contained in:
zhongwuzw 2019-04-10 16:53:41 +08:00
parent d1eea26cd6
commit 0990af52a0
1 changed files with 2 additions and 2 deletions

View File

@ -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];