[Android] FileUtils: prevent NullPointerException
Geoffrey Métais
git at videolan.org
Tue May 28 16:39:18 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 28 16:20:40 2019 +0200| [9b53972162b0d71ad8055c71b7e635d53f02746d] | committer: Geoffrey Métais
FileUtils: prevent NullPointerException
> https://code.videolan.org/videolan/vlc-android/commit/9b53972162b0d71ad8055c71b7e635d53f02746d
---
vlc-android/src/org/videolan/vlc/util/FileUtils.kt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/util/FileUtils.kt b/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
index eafdbfee8..adad06d02 100644
--- a/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
+++ b/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
@@ -439,6 +439,9 @@ object FileUtils {
} catch (e: IllegalArgumentException) {
Log.e(TAG, "Couldn't understand the intent")
return null
+ } catch (e: NullPointerException) {
+ Log.e(TAG, "Couldn't understand the intent")
+ return null
} catch (e: SecurityException) {
Log.e(TAG, "Permission is no longer valid")
return null
More information about the Android
mailing list