mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
fixing a crash at checking image load fail reason
This commit is contained in:
parent
199a0a2407
commit
039d73dde8
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
.apply(options)
|
||||
.listener(object : RequestListener<Bitmap> {
|
||||
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Bitmap>?, isFirstResource: Boolean): Boolean {
|
||||
if (!useHalfResolution && e?.rootCauses?.first() is OutOfMemoryError) {
|
||||
if (!useHalfResolution && e?.rootCauses?.firstOrNull() is OutOfMemoryError) {
|
||||
useHalfResolution = true
|
||||
Handler().post {
|
||||
loadBitmap(degrees)
|
||||
|
|
Loading…
Reference in a new issue