aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-12-13 19:48:01 -0800
committerScott Jackson <daneren2005@gmail.com>2012-12-13 19:48:01 -0800
commited267b5ec56c6a07fe51cc59326fb3d2d1c33585 (patch)
tree081a9b142cf8ff94fbf8617297cfc3b948411c16
parentb88942fd78b2f62e4e040453b4479166dc90968a (diff)
parent303e4cacd39d8249c9270d6eb51f9d1187fb0a1a (diff)
downloaddsub-ed267b5ec56c6a07fe51cc59326fb3d2d1c33585.tar.gz
dsub-ed267b5ec56c6a07fe51cc59326fb3d2d1c33585.tar.bz2
dsub-ed267b5ec56c6a07fe51cc59326fb3d2d1c33585.zip
Merge branch 'master' of https://github.com/daneren2005/Subsonic.git
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java6
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);
}