From f9632749423758980c3840f1e00f0da4cc6303ab Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Apr 2018 14:34:51 +0200 Subject: [PATCH] ignore files with null name --- .../com/simplemobiletools/gallery/helpers/MediaFetcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt index 179262e30..2c3ea3dae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -220,7 +220,7 @@ class MediaFetcher(val context: Context) { break } - val filename = file.name + val filename = file.name ?: continue val isImage = filename.isImageFast() val isVideo = if (isImage) false else filename.isVideoFast() val isGif = if (isImage || isVideo) false else filename.isGif()