From 1ff41093743010786f7f4d6215988c7f294f1d63 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Fri, 21 Mar 2014 19:12:23 +0100 Subject: [PATCH] fix --- library/src/uk/co/senab/bitmapcache/BitmapMemoryLruCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/uk/co/senab/bitmapcache/BitmapMemoryLruCache.java b/library/src/uk/co/senab/bitmapcache/BitmapMemoryLruCache.java index 70ae13d..dff29c6 100644 --- a/library/src/uk/co/senab/bitmapcache/BitmapMemoryLruCache.java +++ b/library/src/uk/co/senab/bitmapcache/BitmapMemoryLruCache.java @@ -83,7 +83,7 @@ Bitmap getBitmapFromRemoved(final int width, final int height) { while (it.hasNext()) { CacheableBitmapDrawable value = it.next().get(); - if (value != null && value.isBitmapValid() && value.isBitmapMutable()) { + if (value != null && value.isBitmapValid() && value.isBitmapMutable() && !value.isBeingDisplayed() && !value.isReferencedByCache()) { if (value.getIntrinsicWidth() == width && value.getIntrinsicHeight() == height) { it.remove();