[Android] TV background manager: add nullity checks
Geoffrey Métais
git at videolan.org
Tue Feb 6 13:37:31 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb 6 13:13:53 2018 +0100| [b3b86a42ea41f34dcf2e0391cac20a1709b74953] | committer: Geoffrey Métais
TV background manager: add nullity checks
> https://code.videolan.org/videolan/vlc-android/commit/b3b86a42ea41f34dcf2e0391cac20a1709b74953
---
vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java | 2 ++
1 file changed, 2 insertions(+)
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 dd4ad7163..3631f9e71 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
@@ -151,6 +151,7 @@ public class TvUtil {
VLCApplication.runBackground(new Runnable() {
@Override
public void run() {
+ if (bm == null) return;
Bitmap cover = AudioUtil.readCoverBitmap(Uri.decode(artworkMrl), 512);
if (cover == null) return;
if (crop)
@@ -159,6 +160,7 @@ public class TvUtil {
VLCApplication.runOnMainThread(new Runnable() {
@Override
public void run() {
+ if (bm == null) return;
bm.setColor(0);
bm.setDrawable(new BitmapDrawable(VLCApplication.getAppResources(), blurred));
}
More information about the Android
mailing list