mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-31 12:42:50 +08:00
CB-10873 Avoid crash due to usage of uninitialized variable when writing geolocation data to image destination
This commit is contained in:
parent
82c9f4524a
commit
def399fe51
@ -358,6 +358,7 @@ static NSString* toBase64(NSData* data) {
|
|||||||
// use image unedited as requested , don't resize
|
// use image unedited as requested , don't resize
|
||||||
data = UIImageJPEGRepresentation(image, 1.0);
|
data = UIImageJPEGRepresentation(image, 1.0);
|
||||||
} else {
|
} else {
|
||||||
|
data = UIImageJPEGRepresentation(image, [options.quality floatValue] / 100.0f);
|
||||||
if (options.usesGeolocation) {
|
if (options.usesGeolocation) {
|
||||||
NSDictionary* controllerMetadata = [info objectForKey:@"UIImagePickerControllerMediaMetadata"];
|
NSDictionary* controllerMetadata = [info objectForKey:@"UIImagePickerControllerMediaMetadata"];
|
||||||
if (controllerMetadata) {
|
if (controllerMetadata) {
|
||||||
@ -374,8 +375,6 @@ static NSString* toBase64(NSData* data) {
|
|||||||
}
|
}
|
||||||
[[self locationManager] startUpdatingLocation];
|
[[self locationManager] startUpdatingLocation];
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
data = UIImageJPEGRepresentation(image, [options.quality floatValue] / 100.0f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user