[Android] Prevent NPE in background update

Geoffrey Métais git at videolan.org
Tue Jan 16 17:45:20 CET 2018


vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec 29 16:02:27 2017 +0100| [62559ca61da09684a06a9bbb0f76eeebb207bf5d] | committer: Geoffrey Métais

Prevent NPE in background update

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

 vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
index 8e2e5d057..dd4ad7163 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
@@ -152,6 +152,7 @@ public class TvUtil {
                     @Override
                     public void run() {
                         Bitmap cover = AudioUtil.readCoverBitmap(Uri.decode(artworkMrl), 512);
+                        if (cover == null) return;
                         if (crop)
                             cover = BitmapUtil.centerCrop(cover, cover.getWidth(), cover.getWidth()*10/16);
                         final Bitmap blurred = UiTools.blurBitmap(cover, 10f);



More information about the Android mailing list