diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java b/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java index 23f48e02..00858f9c 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java +++ b/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java @@ -207,8 +207,10 @@ public class ImageLoader { if(bitmap == null || bitmap.isRecycled()) { bitmap = FileUtil.getAlbumArtBitmap(context, entry, size); String key = getKey(entry.getCoverArt(), size); - cache.put(key, bitmap); - cache.get(key); + if(key != null && bitmap != null) { + cache.put(key, bitmap); + cache.get(key); + } } if(bitmap != null && bitmap.isRecycled()) { |