[Android] Fix NullPointerException

Nicolas Pomepuy git at videolan.org
Thu Aug 12 11:56:12 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Aug 12 10:01:42 2021 +0200| [8b95d91125c721e09a230c77b7587903d05d8f7f] | committer: Nicolas Pomepuy

Fix NullPointerException

> https://code.videolan.org/videolan/vlc-android/commit/8b95d91125c721e09a230c77b7587903d05d8f7f
---

 .../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 d5841ad85..3a7fd13a9 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
@@ -297,7 +297,7 @@ open class BaseBrowserAdapter(val browserContainer: BrowserContainer<MediaLibrar
     }
 
     private fun getProtocol(media: MediaWrapper): String? {
-        return if (media.type != MediaWrapper.TYPE_DIR) null else media.uri.scheme
+        return if (media.type != MediaWrapper.TYPE_DIR) null else media.uri?.scheme
     }
 
     open fun checkBoxAction(v: View, mrl: String) {}



More information about the Android mailing list