Skip to content

Commit d522305

Browse files
alperozturk96AndyScherzinger
authored andcommitted
check nullability of the dim just in case
Signed-off-by: alperozturk <[email protected]>
1 parent c688545 commit d522305

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/owncloud/android/ui/adapter/GalleryRowHolder.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ class GalleryRowHolder(
7676
val dimensions = getDimensions(row)
7777

7878
for (i in row.files.indices) {
79-
adjustFile(i, row.files[i], dimensions[i], row)
79+
val dim = dimensions.getOrNull(i) ?: (defaultThumbnailSize.toInt() to defaultThumbnailSize.toInt())
80+
adjustFile(i, row.files[i], dim, row)
8081
}
8182
}
8283

0 commit comments

Comments
 (0)