incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject android commit: CB=1293: Camera.getPicture crashes when selecting from a Picasa album on Android
Date Wed, 29 Aug 2012 16:46:53 GMT
Updated Branches:
  refs/heads/master e07822350 -> f7ae7fe43


CB=1293: Camera.getPicture crashes when selecting from a Picasa album on Android


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/f7ae7fe4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/f7ae7fe4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/f7ae7fe4

Branch: refs/heads/master
Commit: f7ae7fe43a7cd2c99df9698abf5baa56e1b867e0
Parents: e078223
Author: macdonst <simon.macdonald@gmail.com>
Authored: Wed Aug 29 12:46:12 2012 -0400
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Wed Aug 29 12:46:12 2012 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/CameraLauncher.java     |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/f7ae7fe4/framework/src/org/apache/cordova/CameraLauncher.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CameraLauncher.java b/framework/src/org/apache/cordova/CameraLauncher.java
index e820265..0e79c5d 100755
--- a/framework/src/org/apache/cordova/CameraLauncher.java
+++ b/framework/src/org/apache/cordova/CameraLauncher.java
@@ -388,6 +388,11 @@ public class CameraLauncher extends Plugin implements MediaScannerConnectionClie
                     } else {
                         // Get the path to the image. Makes loading so much easier.
                         String imagePath = FileUtils.getRealPathFromURI(uri, this.cordova);
+                        // If we don't have a valid image path quit.
+                        if (imagePath == null) {
+                            this.failPicture("Unable to retreive picture!");
+                            return;
+                        }
                         Bitmap bitmap = getScaledBitmap(imagePath);
 
                         if (this.correctOrientation) {


Mime
View raw message