[Android] Prevent NPE in TV util class
Geoffrey Métais
git at videolan.org
Tue Nov 14 11:56:56 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 14 09:31:22 2017 +0100| [8ec167e8ceff413d4859a1f8c0cd3b05e1904aa4] | committer: Geoffrey Métais
Prevent NPE in TV util class
> https://code.videolan.org/videolan/vlc-android/commit/8ec167e8ceff413d4859a1f8c0cd3b05e1904aa4
---
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