From 513bfde49e4226133c976d53834e11b040950d3e Mon Sep 17 00:00:00 2001 From: Wang Jinggang Date: Thu, 5 Jun 2014 15:56:45 +0800 Subject: [PATCH] CB-7558 - hasPendingOperation flag in Camera plugin's takePicture should be reversed to fix memory errors Signed-off-by: Shazron Abdullah --- src/ios/CDVCamera.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index c2409be..cb53932 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -82,7 +82,7 @@ static NSSet* org_apache_cordova_validArrowDirections; NSString* callbackId = command.callbackId; NSArray* arguments = command.arguments; - self.hasPendingOperation = NO; + self.hasPendingOperation = YES; NSString* sourceTypeString = [arguments objectAtIndex:2]; UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera; // default @@ -161,7 +161,7 @@ static NSSet* org_apache_cordova_validArrowDirections; } else { [self.viewController presentViewController:cameraPicker animated:YES completion:nil]; } - self.hasPendingOperation = YES; + self.hasPendingOperation = NO; } - (void)repositionPopover:(CDVInvokedUrlCommand*)command