From dddfea3b1ea35de691cafada4ed4180e4647d66d Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 17 Jun 2018 21:54:44 +0200 Subject: [PATCH] make cursor at retrieving Date Takens nullable --- .../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 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 {