diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java index 4fad1bf3..6740a6d8 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/media/FragmentMedia.java @@ -395,7 +395,9 @@ public class FragmentMedia extends Fragment { @Override public boolean onPreDraw() { imageView.getViewTreeObserver().removeOnPreDrawListener(this); - ActivityCompat.startPostponedEnterTransition(requireActivity()); + if (isAdded()) { + ActivityCompat.startPostponedEnterTransition(requireActivity()); + } return true; } });