Fix a crash with media

fix_513
Thomas 9 months ago
parent 2f11eaf315
commit 13946fe56e

@ -210,6 +210,9 @@ public class FragmentMedia extends Fragment {
@Override @Override
public void onLoadFailed(@Nullable Drawable errorDrawable) { public void onLoadFailed(@Nullable Drawable errorDrawable) {
if (binding == null || !isAdded() || getActivity() == null) {
return;
}
scheduleStartPostponedTransition(binding.mediaPicture); scheduleStartPostponedTransition(binding.mediaPicture);
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
boolean autofetch = sharedpreferences.getBoolean(getString(R.string.SET_FETCH_REMOTE_MEDIA), false); boolean autofetch = sharedpreferences.getBoolean(getString(R.string.SET_FETCH_REMOTE_MEDIA), false);

Loading…
Cancel
Save