[Android] Fix NullPointerException
Nicolas Pomepuy
git at videolan.org
Mon Aug 9 06:19:39 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Aug 9 08:13:36 2021 +0200| [bd21f9c0ecd69f3fdd2cb8355d00e6362a7b2361] | committer: Nicolas Pomepuy
Fix NullPointerException
> https://code.videolan.org/videolan/vlc-android/commit/bd21f9c0ecd69f3fdd2cb8355d00e6362a7b2361
---
.../vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
index 6b5b5c700..d5841ad85 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
@@ -146,7 +146,7 @@ open class BaseBrowserAdapter(val browserContainer: BrowserContainer<MediaLibrar
val media = getItem(position) as MediaWrapper
val isFavorite = media.hasStateFlags(MediaLibraryItem.FLAG_FAVORITE)
vh.bindingContainer.setItem(media)
- val scheme = media.uri.scheme
+ val scheme = media.uri?.scheme ?: ""
vh.bindingContainer.setHasContextMenu(((!networkRoot || isFavorite)
&& "content" != scheme
&& "otg" != scheme))
More information about the Android
mailing list