mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
catch outofmemory errors at gif loading
This commit is contained in:
parent
1afddbc7bb
commit
12e3f61574
1 changed files with 2 additions and 0 deletions
|
@ -160,6 +160,8 @@ fun Activity.loadImage(path: String, target: MySquareImageView, horizontalScroll
|
|||
target.scaleType = if (cropThumbnails) ImageView.ScaleType.CENTER_CROP else ImageView.ScaleType.FIT_CENTER
|
||||
} catch (e: Exception) {
|
||||
loadJpg(path, target, cropThumbnails)
|
||||
} catch (e: OutOfMemoryError) {
|
||||
loadJpg(path, target, cropThumbnails)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue