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 f5d989c50..5e95d2587 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -285,7 +285,7 @@ class MediaFetcher(val context: Context) { val dateTakens = HashMap() val cursor = context.contentResolver.query(uri, projection, selection, selectionArgs, null) - cursor.use { + cursor?.use { if (cursor.moveToFirst()) { do { try {