From 3d4cf4e713e2f031f827f3aa746b40b8845f9b09 Mon Sep 17 00:00:00 2001 From: JurajJarabek Date: Mon, 5 May 2014 15:08:30 +0300 Subject: [PATCH] Recycled Bitmap FIX Fixing of crash on few devices because of recycled bitmap issue. --- .../src/eu/janmuller/android/simplecropimage/CropImage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simple-crop-image-lib/src/eu/janmuller/android/simplecropimage/CropImage.java b/simple-crop-image-lib/src/eu/janmuller/android/simplecropimage/CropImage.java index b3c57fb..1c5cbab 100644 --- a/simple-crop-image-lib/src/eu/janmuller/android/simplecropimage/CropImage.java +++ b/simple-crop-image-lib/src/eu/janmuller/android/simplecropimage/CropImage.java @@ -557,11 +557,11 @@ private void makeDefault() { // Scale the image down for faster face detection. private Bitmap prepareBitmap() { - if (mBitmap == null) { + if (mBitmap.isRecycled()) { - return null; + mBitmap = getBitmap( mImagePath ); } - + // 256 pixels wide is enough. if (mBitmap.getWidth() > 256) {