From 1b88318f467ce8c1b564bcfb61cd742e343fbc75 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 23 Nov 2017 09:44:26 +0100 Subject: [PATCH] catch OutOfMemory errors at GifDrawables --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 17e6cb52f..63cd99e2a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -178,6 +178,9 @@ class PhotoFragment : ViewPagerFragment() { } catch (e: Exception) { gifDrawable = null loadBitmap() + } catch (e: OutOfMemoryError) { + gifDrawable = null + loadBitmap() } }