add a null check at obtaining files to fix some crashes
This commit is contained in:
parent
001bf403d1
commit
657b14fdb4
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
|||
if (cursor != null && cursor.moveToFirst()) {
|
||||
val pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA)
|
||||
do {
|
||||
val fullPath = cursor.getString(pathIndex)
|
||||
val fullPath: String = cursor.getString(pathIndex) ?: continue
|
||||
val file = File(fullPath)
|
||||
val parentDir = file.parent
|
||||
|
||||
|
|
Loading…
Reference in a new issue