aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-10-28 14:51:12 -0700
committerScott Jackson <daneren2005@gmail.com>2012-10-28 14:51:12 -0700
commit5856d765d8216a6eceb613ae0d70fc3e9273b193 (patch)
tree07defc17d0f0f44f542334f7d2846b779af2015a /subsonic-android
parentd24b8e919cf3078295d266ce687748a7a42ce367 (diff)
downloaddsub-5856d765d8216a6eceb613ae0d70fc3e9273b193.tar.gz
dsub-5856d765d8216a6eceb613ae0d70fc3e9273b193.tar.bz2
dsub-5856d765d8216a6eceb613ae0d70fc3e9273b193.zip
Fixed issue if remoteControl == null when called
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java
index 5efec7f1..6e0db070 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java
@@ -169,12 +169,14 @@ public class ImageLoader implements Runnable {
}
private void setImage(RemoteControlClient remoteControl, Drawable drawable) {
- Bitmap origBitmap = ((BitmapDrawable)drawable).getBitmap();
- remoteControl.editMetadata(false)
- .putBitmap(
- RemoteControlClient.MetadataEditor.BITMAP_KEY_ARTWORK,
- origBitmap.copy(origBitmap.getConfig(), true))
- .apply();
+ if(remoteControl != null) {
+ Bitmap origBitmap = ((BitmapDrawable)drawable).getBitmap();
+ remoteControl.editMetadata(false)
+ .putBitmap(
+ RemoteControlClient.MetadataEditor.BITMAP_KEY_ARTWORK,
+ origBitmap.copy(origBitmap.getConfig(), true))
+ .apply();
+ }
}
private void setImage(ActionBar actionBar, Drawable drawable) {