add an extra activity existing check at trying to reload bitmap

This commit is contained in:
tibbi 2018-03-22 15:16:09 +01:00
parent 5468baf513
commit f8a4e68a1f

View file

@ -258,7 +258,9 @@ class PhotoFragment : ViewPagerFragment() {
if (!useHalfResolution && e?.rootCauses?.firstOrNull() is OutOfMemoryError) { if (!useHalfResolution && e?.rootCauses?.firstOrNull() is OutOfMemoryError) {
useHalfResolution = true useHalfResolution = true
Handler().post { Handler().post {
loadBitmap(degrees) if (activity?.isActivityDestroyed() == false) {
loadBitmap(degrees)
}
} }
} }
return false return false