From a2c485cbe86e05edabddb8fae794a19061b53b8b Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 6 Dec 2016 00:06:28 +0100 Subject: [PATCH] check null displayname --- .../simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt index 424c7740a..da420a50b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt @@ -61,7 +61,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo if (file.parent != mPath) continue - val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) + val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) ?: "" val dateModified = cursor.getLongValue(MediaStore.Images.Media.DATE_MODIFIED) val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN) media.add(Medium(name, curPath, i == 1, dateModified, dateTaken, size))