- Avoid crash due to usage of uninitialized variable when writing geolocation data to image destination
    - Properly handle 'CameraUsesGeolocation' option by properly setting geolocation data in EXIF header in all cases

 This closes #205
This commit is contained in:
Omar Mefire 2016-04-13 12:14:46 -07:00
parent def399fe51
commit 4202fff7ac

View File

@ -359,6 +359,8 @@ static NSString* toBase64(NSData* data) {
data = UIImageJPEGRepresentation(image, 1.0);
} else {
data = UIImageJPEGRepresentation(image, [options.quality floatValue] / 100.0f);
}
if (options.usesGeolocation) {
NSDictionary* controllerMetadata = [info objectForKey:@"UIImagePickerControllerMediaMetadata"];
if (controllerMetadata) {
@ -377,7 +379,6 @@ static NSString* toBase64(NSData* data) {
}
}
}
}
break;
default:
break;