mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 20:08:31 +00:00
fix crash when chosse photo from camera
This commit is contained in:
parent
859c4fea29
commit
c8c40003d6
1 changed files with 7 additions and 3 deletions
|
|
@ -163,9 +163,13 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[self dismiss];
|
||||
|
||||
NSURL *alassetURL = [info objectForKey:UIImagePickerControllerReferenceURL];
|
||||
PHFetchResult<PHAsset *> *phFetchResult = [PHAsset fetchAssetsWithALAssetURLs:@[alassetURL] options:nil];
|
||||
PHAsset *phasset = [phFetchResult firstObject];
|
||||
//PHAsset *phasset = [info objectForKey:UIImagePickerControllerPHAsset];
|
||||
PHAsset *phasset = nil;
|
||||
// when photo from camera, it hasn't be saved
|
||||
if (alassetURL) {
|
||||
PHFetchResult<PHAsset *> *phFetchResult = [PHAsset fetchAssetsWithALAssetURLs:@[alassetURL] options:nil];
|
||||
phasset = [phFetchResult firstObject];
|
||||
}
|
||||
|
||||
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage] ? [info objectForKey:UIImagePickerControllerEditedImage] : [info objectForKey:UIImagePickerControllerOriginalImage];
|
||||
if (!phasset) {
|
||||
__block PHObjectPlaceholder *placeHolder;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue