Fixes crash for apng coder when properties are nil
This commit is contained in:
parent
767a6643f8
commit
d1eea26cd6
|
@ -154,6 +154,9 @@ const CFStringRef kCGImagePropertyAPNGUnclampedDelayTime = (__bridge CFStringRef
|
|||
float frameDuration = 0.1f;
|
||||
CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil);
|
||||
NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties;
|
||||
if (!frameProperties) {
|
||||
return frameDuration;
|
||||
}
|
||||
NSDictionary *pngProperties = frameProperties[(NSString *)kCGImagePropertyPNGDictionary];
|
||||
|
||||
NSNumber *delayTimeUnclampedProp = pngProperties[(__bridge NSString *)kCGImagePropertyAPNGUnclampedDelayTime];
|
||||
|
|
Loading…
Reference in New Issue