From c3e5305fa2b8619bbe31938f1bae20f1b32db666 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Wed, 12 Dec 2018 19:37:18 +0100 Subject: [PATCH] fix another crash in ViewImageFragment --- .../com/keylesspalace/tusky/fragment/ViewImageFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt index fe1e1a50..52a85eb2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt @@ -105,8 +105,10 @@ class ViewImageFragment : ViewMediaFragment() { override fun onError() { // if there's no image in cache, load from network and start transition // immediately. - photoActionsListener.onBringUp() - loadImageFromNetwork(url, photoView) + if (isAdded) { + photoActionsListener.onBringUp() + loadImageFromNetwork(url, photoView) + } } }) } else {