From 74cb9f3a32639edaadeb6318596a11d6dfdc540a Mon Sep 17 00:00:00 2001 From: Jehan Date: Fri, 10 Jul 2015 20:21:15 -0700 Subject: [PATCH] correct small edge case in rotation option --- RCTCameraManager.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RCTCameraManager.m b/RCTCameraManager.m index 538cd2e..6482810 100644 --- a/RCTCameraManager.m +++ b/RCTCameraManager.m @@ -308,8 +308,8 @@ RCT_EXPORT_METHOD(stopCapture) { CGImageRef cgImage; cgImage = CGImageSourceCreateImageAtIndex(source, 0, NULL); - float rotation = [[options objectForKey:@"rotation"] floatValue]; - if (rotation) { + if ([options objectForKey:@"rotation"]) { + float rotation = [[options objectForKey:@"rotation"] floatValue]; cgImage = [self CGImageRotatedByAngle:cgImage angle:rotation]; } else { // Get metadata orientation