Fix a crash

This commit is contained in:
Thomas 2024-01-12 11:11:57 +01:00
parent e589e2549d
commit 16686e88eb

View file

@ -395,7 +395,9 @@ public class FragmentMedia extends Fragment {
@Override @Override
public boolean onPreDraw() { public boolean onPreDraw() {
imageView.getViewTreeObserver().removeOnPreDrawListener(this); imageView.getViewTreeObserver().removeOnPreDrawListener(this);
ActivityCompat.startPostponedEnterTransition(requireActivity()); if (isAdded()) {
ActivityCompat.startPostponedEnterTransition(requireActivity());
}
return true; return true;
} }
}); });