[Android] Fix NullPointerException
Nicolas Pomepuy
git at videolan.org
Mon Dec 7 13:49:45 CET 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Dec 4 11:40:08 2020 +0100| [894f0588793d09ac9dc0d51d3afcf1687b657453] | committer: Nicolas Pomepuy
Fix NullPointerException
> https://code.videolan.org/videolan/vlc-android/commit/894f0588793d09ac9dc0d51d3afcf1687b657453
---
.../java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
index 22693efe8..0966eb814 100644
--- a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
@@ -261,7 +261,7 @@ class FileBrowserTvFragment : BaseBrowserTvFragment<MediaLibraryItem>(), PathAda
}
private fun togglefavorite() {
- currentItem.let { item ->
+ currentItem?.let { item ->
lifecycleScope.launch {
val mw = (item as MediaWrapper)
withContext(Dispatchers.IO) {
More information about the Android
mailing list