forked from public/cordova-plugin-camera
Prevent NPE on processResiultFromGallery when intent comes null
close #22
This commit is contained in:
committed by
Andrew Grieve
parent
fa93b534d1
commit
5b8324e984
@@ -641,7 +641,7 @@ private String ouputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException {
|
|||||||
|
|
||||||
// If retrieving photo from library
|
// If retrieving photo from library
|
||||||
else if ((srcType == PHOTOLIBRARY) || (srcType == SAVEDPHOTOALBUM)) {
|
else if ((srcType == PHOTOLIBRARY) || (srcType == SAVEDPHOTOALBUM)) {
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK && intent != null) {
|
||||||
this.processResultFromGallery(destType, intent);
|
this.processResultFromGallery(destType, intent);
|
||||||
}
|
}
|
||||||
else if (resultCode == Activity.RESULT_CANCELED) {
|
else if (resultCode == Activity.RESULT_CANCELED) {
|
||||||
|
|||||||
Reference in New Issue
Block a user