Skip to content

Commit a2c485c

Browse files
committed
check null displayname
1 parent f0f07d9 commit a2c485c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo
6161
if (file.parent != mPath)
6262
continue
6363

64-
val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
64+
val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) ?: ""
6565
val dateModified = cursor.getLongValue(MediaStore.Images.Media.DATE_MODIFIED)
6666
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
6767
media.add(Medium(name, curPath, i == 1, dateModified, dateTaken, size))

0 commit comments

Comments
 (0)