Skip to content
Snippets Groups Projects
Commit 9fbd77c5 authored by Hans-Christoph Steiner's avatar Hans-Christoph Steiner
Browse files

Merge branch 'export-logcat-crash' into 'master'

Don't crash when context is gone after saving logcat like when the user has closed F-Droid already

Closes acra-crash-reports#817

See merge request fdroid/fdroidclient!1537
parents 33b483f2 8b8843f5
No related branches found
No related tags found
No related merge requests found
......@@ -704,7 +704,8 @@ public class PreferencesFragment extends PreferenceFragmentCompat
}
}, result -> {
int res = result ? R.string.export_log_success : R.string.export_log_error;
Toast.makeText(requireContext(), res, Toast.LENGTH_LONG).show();
Context context = getContext();
if (context != null) Toast.makeText(context, res, Toast.LENGTH_LONG).show();
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment