[Android] Prevent NullPointerException
Nicolas Pomepuy
git at videolan.org
Fri Oct 2 07:52:25 CEST 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Oct 1 08:19:17 2020 +0200| [563372db1ec7bafe7a6aa73e54163c9413956ae5] | committer: Nicolas Pomepuy
Prevent NullPointerException
> https://code.videolan.org/videolan/vlc-android/commit/563372db1ec7bafe7a6aa73e54163c9413956ae5
---
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