Skip to content

Commit 09a3ca0

Browse files
committed
修复iOS14下拍视频闪退问题
1 parent 5a7e69d commit 09a3ca0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,11 @@ - (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingM
846846
NSURL *videoUrl = [info objectForKey:UIImagePickerControllerMediaURL];
847847
if (videoUrl) {
848848
[[TZImageManager manager] saveVideoWithUrl:videoUrl location:self.location completion:^(PHAsset *asset, NSError *error) {
849-
if (!error) {
849+
if (!error && asset) {
850850
[self addPHAsset:asset];
851+
} else {
852+
TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
853+
[tzImagePickerVc hideProgressHUD];
851854
}
852855
}];
853856
self.location = nil;

0 commit comments

Comments
 (0)