diff --git a/iphone/Classes/MediaModule.m b/iphone/Classes/MediaModule.m index 52ebc41ee9c..a811f6734fe 100644 --- a/iphone/Classes/MediaModule.m +++ b/iphone/Classes/MediaModule.m @@ -1470,10 +1470,12 @@ - (void)displayModalPicker:(UIViewController *)picker_ settings:(NSDictionary *) - (void)updatePopoverNow:(UIViewController *)picker_ { UIViewController *theController = picker_; - [theController setModalPresentationStyle:UIModalPresentationPopover]; - UIPopoverPresentationController *thePresenter = [theController popoverPresentationController]; - [thePresenter setPermittedArrowDirections:arrowDirection]; - [thePresenter setDelegate:self]; + if (self.popoverView != nil) { + [theController setModalPresentationStyle:UIModalPresentationPopover]; + UIPopoverPresentationController *thePresenter = [theController popoverPresentationController]; + [thePresenter setPermittedArrowDirections:arrowDirection]; + [thePresenter setDelegate:self]; + } [[TiApp app] showModalController:theController animated:animatedPicker]; return; } @@ -1736,8 +1738,7 @@ - (void)handleTrimmedVideo:(NSURL *)theURL withDictionary:(NSDictionary *)dictio - (void)showPHPicker:(NSDictionary *)args { if (_phPicker != nil) { - [self sendPickerError:MediaModuleErrorBusy]; - return; + [self destroyPicker]; } animatedPicker = YES;