am 6a4db337: Merge "Fix NPE on non decodable Bitmap" into klp-dev

* commit '6a4db337c716d739c55b0c154eb16770a4b917e4':
  Fix NPE on non decodable Bitmap
diff --git a/src/com/android/contacts/activities/AttachPhotoActivity.java b/src/com/android/contacts/activities/AttachPhotoActivity.java
index c09af3c..6a55c30 100644
--- a/src/com/android/contacts/activities/AttachPhotoActivity.java
+++ b/src/com/android/contacts/activities/AttachPhotoActivity.java
@@ -223,6 +223,10 @@
             Log.w(TAG, "Could not find bitmap");
             return;
         }
+        if (bitmap == null) {
+            Log.w(TAG, "Could not decode bitmap");
+            return;
+        }
 
         final Bitmap scaled = Bitmap.createScaledBitmap(bitmap, size, size, false);
         final byte[] compressed = ContactPhotoUtils.compressBitmap(scaled);