Merge "Fix possible NPE in ContactPhotoManager." into ics-mr0
diff --git a/src/com/android/contacts/ContactPhotoManager.java b/src/com/android/contacts/ContactPhotoManager.java
index e04a07a..7b54666 100644
--- a/src/com/android/contacts/ContactPhotoManager.java
+++ b/src/com/android/contacts/ContactPhotoManager.java
@@ -359,8 +359,10 @@
view.setImageBitmap(holder.bitmap);
- // Put the bitmap in the LRU cache
- mBitmapCache.put(request, holder.bitmap);
+ if (holder.bitmap != null) {
+ // Put the bitmap in the LRU cache
+ mBitmapCache.put(request, holder.bitmap);
+ }
// Soften the reference
holder.bitmap = null;