[Android] Prevent NPE in TV util class
Geoffrey Métais
git at videolan.org
Tue Nov 14 12:03:01 CET 2017
vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 14 09:31:22 2017 +0100| [e4b5102b9a604c8033e572346eb2a25c61cb43a9] | committer: Geoffrey Métais
Prevent NPE in TV util class
(cherry picked from commit 8ec167e8ceff413d4859a1f8c0cd3b05e1904aa4)
> https://code.videolan.org/videolan/vlc-android/commit/e4b5102b9a604c8033e572346eb2a25c61cb43a9
---
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 64d7470a4..8e2e5d057 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
@@ -142,6 +142,7 @@ public class TvUtil {
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
public static void updateBackground(final BackgroundManager bm, Object item) {
+ if (bm == null) return;
if (item instanceof MediaLibraryItem) {
final boolean crop = ((MediaLibraryItem) item).getItemType() != MediaLibraryItem.TYPE_MEDIA
|| ((MediaWrapper)item).getType() == MediaWrapper.TYPE_AUDIO;
More information about the Android
mailing list