mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-02-21 12:32:52 +08:00
Prevent NPE on processResiultFromGallery when intent comes null
close #22
This commit is contained in:
parent
fa93b534d1
commit
5b8324e984
@ -641,7 +641,7 @@ private String ouputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException {
|
||||
|
||||
// If retrieving photo from library
|
||||
else if ((srcType == PHOTOLIBRARY) || (srcType == SAVEDPHOTOALBUM)) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
if (resultCode == Activity.RESULT_OK && intent != null) {
|
||||
this.processResultFromGallery(destType, intent);
|
||||
}
|
||||
else if (resultCode == Activity.RESULT_CANCELED) {
|
||||
|
Loading…
Reference in New Issue
Block a user