CB-1212: When camera is started, and then cancelled with no photo, attempt to read exif data results in fatal error

This commit is contained in:
macdonst 2012-08-08 15:53:48 -04:00
parent d35c913249
commit c52dc10c9e

View File

@ -273,6 +273,9 @@ public class CameraLauncher extends Plugin implements MediaScannerConnectionClie
// If CAMERA // If CAMERA
if (srcType == CAMERA) { if (srcType == CAMERA) {
// If image available
if (resultCode == Activity.RESULT_OK) {
try {
// Create an ExifHelper to save the exif data that is lost during compression // Create an ExifHelper to save the exif data that is lost during compression
ExifHelper exif = new ExifHelper(); ExifHelper exif = new ExifHelper();
try { try {
@ -284,9 +287,7 @@ public class CameraLauncher extends Plugin implements MediaScannerConnectionClie
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
// If image available
if (resultCode == Activity.RESULT_OK) {
try {
Bitmap bitmap = null; Bitmap bitmap = null;
Uri uri = null; Uri uri = null;