mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-02-22 04:52:51 +08:00
workaround for Issue #778
setting data to nil in line 386 crashes the front end app. Therefore I commented it out. This is not a perfect solution for the Issue #778 because we want the location data when `CameraUsesGeolocation` but better not to crash.
This commit is contained in:
parent
23642f09b5
commit
6845bac9c6
@ -406,7 +406,7 @@ static NSString* toBase64(NSData* data) {
|
||||
}
|
||||
[[self locationManager] startUpdatingLocation];
|
||||
}
|
||||
data = nil;
|
||||
// data = nil; // this causes Issue #778
|
||||
}
|
||||
} else if (pickerController.sourceType == UIImagePickerControllerSourceTypePhotoLibrary) {
|
||||
PHAsset* asset = [info objectForKey:@"UIImagePickerControllerPHAsset"];
|
||||
@ -659,7 +659,7 @@ static NSString* toBase64(NSData* data) {
|
||||
NSString* mediaType = [info objectForKey:UIImagePickerControllerMediaType];
|
||||
if ([mediaType isEqualToString:(NSString*)kUTTypeImage]) {
|
||||
[weakSelf resultForImage:cameraPicker.pictureOptions info:info completion:^(CDVPluginResult* res) {
|
||||
if (![self usesGeolocation] || picker.sourceType != UIImagePickerControllerSourceTypeCamera) {
|
||||
if (![weakSelf usesGeolocation] || picker.sourceType != UIImagePickerControllerSourceTypeCamera) {
|
||||
[weakSelf.commandDelegate sendPluginResult:res callbackId:cameraPicker.callbackId];
|
||||
weakSelf.hasPendingOperation = NO;
|
||||
weakSelf.pickerController = nil;
|
||||
|
Loading…
Reference in New Issue
Block a user