[Android] MediaUtils: Fix potential NPE

Geoffrey Métais git at videolan.org
Fri Jun 21 15:13:37 CEST 2019


vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun 21 15:09:50 2019 +0200| [7d3dff1bde1d31e10e6bbd1c11f456e1b6cbd05c] | committer: Geoffrey Métais

MediaUtils: Fix potential NPE

(cherry picked from commit d9858b115e5ce6a337681d0cbcbb189d56db2150)

> https://code.videolan.org/videolan/vlc-android/commit/7d3dff1bde1d31e10e6bbd1c11f456e1b6cbd05c
---

 vlc-android/src/org/videolan/vlc/media/MediaUtils.kt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt b/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
index 185d47e4a..ee62a74f1 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
+++ b/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
@@ -290,6 +290,8 @@ object MediaUtils : CoroutineScope {
         data
     } catch (e: IllegalArgumentException) {
         data
+    } catch (e: NullPointerException) {
+        data
     }
 
     private fun getMediaString(ctx: Context?, id: Int): String {



More information about the Android mailing list