mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
CB=1293: Camera.getPicture crashes when selecting from a Picasa album on Android
This commit is contained in:
parent
e07822350e
commit
f7ae7fe43a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user