[Android] Fix custom binding called for folders selector

Geoffrey Métais git at videolan.org
Fri May 6 10:10:55 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May  6 09:13:00 2016 +0200| [a2098afce77ce55141cfe0857ed41516d8cd33a5] | committer: Geoffrey Métais

Fix custom binding called for folders selector

> https://code.videolan.org/videolan/vlc-android/commit/a2098afce77ce55141cfe0857ed41516d8cd33a5
---

 vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java b/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
index 146873d..2da5f46 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
@@ -23,7 +23,6 @@
 
 package org.videolan.vlc.gui.helpers;
 
-import android.app.Activity;
 import android.databinding.BindingAdapter;
 import android.databinding.OnRebindCallback;
 import android.databinding.ViewDataBinding;
@@ -44,8 +43,6 @@ import org.videolan.vlc.gui.audio.AudioBrowserListAdapter;
 import org.videolan.vlc.media.MediaWrapper;
 import org.videolan.vlc.util.HttpImageLoader;
 
-import java.util.concurrent.Callable;
-
 public class AsyncImageLoader {
 
     public interface Callbacks {
@@ -145,6 +142,8 @@ public class AsyncImageLoader {
 
     @BindingAdapter({"bind:mediaWithArt"})
     public static void downloadIcon(View v, MediaWrapper mw) {
+        if (mw == null)
+            return;
         ViewDataBinding vdb = (ViewDataBinding) v.getTag();
         if (TextUtils.isEmpty(mw.getArtworkURL()) || !mw.getArtworkURL().startsWith("http"))
             return;



More information about the Android mailing list