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

This commit is contained in:
macdonst 2012-08-29 12:46:12 -04:00
parent e07822350e
commit f7ae7fe43a

View File

@ -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) {