diff options
author | daneren2005 <daneren2005@gmail.com> | 2012-12-13 14:41:31 -0800 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2012-12-13 14:41:31 -0800 |
commit | 303e4cacd39d8249c9270d6eb51f9d1187fb0a1a (patch) | |
tree | 29ab051e733d300fd275ec02eac5baaa83a6a808 /subsonic-android/src/github | |
parent | bcae7366c015165e9afbea9d0d3ded0f6e47524d (diff) | |
download | dsub-303e4cacd39d8249c9270d6eb51f9d1187fb0a1a.tar.gz dsub-303e4cacd39d8249c9270d6eb51f9d1187fb0a1a.tar.bz2 dsub-303e4cacd39d8249c9270d6eb51f9d1187fb0a1a.zip |
Fix for trying to pass 0 as bitmap width/height
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java index 8c037468..dcf4b389 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java @@ -147,7 +147,11 @@ public class ImageLoader implements Runnable { Drawable existingDrawable = imageView.getDrawable(); if (existingDrawable == null) { - Bitmap emptyImage = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); + if(drawable.getIntrinsicWidth() > 0 && drawable.getIntrinsicHeight() > 0) { + Bitmap emptyImage = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); + } else { + Bitmap emptyImage = Bitmap.createBitmap(imageSizeDefault, imageSizeDefault, Bitmap.Config.ARGB_8888); + } existingDrawable = new BitmapDrawable(emptyImage); } |