diff --git a/src/com/fsck/k9/activity/misc/ContactPictureLoader.java b/src/com/fsck/k9/activity/misc/ContactPictureLoader.java index 9b4d5f5c4..8479738bf 100644 --- a/src/com/fsck/k9/activity/misc/ContactPictureLoader.java +++ b/src/com/fsck/k9/activity/misc/ContactPictureLoader.java @@ -238,10 +238,12 @@ public class ContactPictureLoader { if (stream != null) { try { Bitmap tempBitmap = BitmapFactory.decodeStream(stream); - bitmap = Bitmap.createScaledBitmap(tempBitmap, mPictureSizeInPx, - mPictureSizeInPx, true); - if (tempBitmap != bitmap) { - tempBitmap.recycle(); + if (tempBitmap != null) { + bitmap = Bitmap.createScaledBitmap(tempBitmap, mPictureSizeInPx, + mPictureSizeInPx, true); + if (tempBitmap != bitmap) { + tempBitmap.recycle(); + } } } finally { try { stream.close(); } catch (IOException e) { /* ignore */ }