[Android] Prevent NullPointerException
Nicolas Pomepuy
git at videolan.org
Tue Oct 6 10:58:46 CEST 2020
vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Oct 1 08:19:17 2020 +0200| [6b4e6dc455d2ff738af4a17207a9c3269681a9f7] | committer: Nicolas Pomepuy
Prevent NullPointerException
(cherry picked from commit 563372db1ec7bafe7a6aa73e54163c9413956ae5)
> https://code.videolan.org/videolan/vlc-android/commit/6b4e6dc455d2ff738af4a17207a9c3269681a9f7
---
application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
index 4a9600dd4..5d496a33d 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
@@ -103,6 +103,8 @@ object FileUtils {
return ""
} catch (e: SecurityException) {
return ""
+ } catch (e: NullPointerException) {
+ return ""
} finally {
if (cursor != null && !cursor.isClosed) cursor.close()
}
More information about the Android
mailing list