[Android] Prevent NPE in background update

Geoffrey Métais git at videolan.org
Fri Dec 29 16:37:47 CET 2017


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

Prevent NPE in background update

(cherry picked from commit 62559ca61da09684a06a9bbb0f76eeebb207bf5d)

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

 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