You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/06/27 19:34:18 UTC
git commit: Prevent NPE on processResiultFromGallery when intent
comes null
Repository: cordova-plugin-camera
Updated Branches:
refs/heads/master fa93b534d -> 5b8324e98
Prevent NPE on processResiultFromGallery when intent comes null
close #22
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/5b8324e9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/5b8324e9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/5b8324e9
Branch: refs/heads/master
Commit: 5b8324e98477b3066a00a1e8ecf4ac9fe0fbc714
Parents: fa93b53
Author: Manu Garcia Urreta <mg...@mac.com>
Authored: Fri Mar 28 20:05:04 2014 -0300
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Jun 27 13:33:03 2014 -0400
----------------------------------------------------------------------
src/android/CameraLauncher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/5b8324e9/src/android/CameraLauncher.java
----------------------------------------------------------------------
diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java
index 96c15da..6d80f73 100755
--- a/src/android/CameraLauncher.java
+++ b/src/android/CameraLauncher.java
@@ -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) {