mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 03:46:00 +01:00
Prevent crash
This commit is contained in:
@@ -63,6 +63,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
public class FragmentOptionsPrivacy extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private View view;
|
||||
private ImageButton ibHelp;
|
||||
private SwitchCompat swConfirmLinks;
|
||||
private SwitchCompat swCheckLinksDbl;
|
||||
@@ -123,7 +124,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
||||
setSubtitle(R.string.title_setup);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_options_privacy, container, false);
|
||||
view = inflater.inflate(R.layout.fragment_options_privacy, container, false);
|
||||
|
||||
// Get controls
|
||||
|
||||
@@ -529,9 +530,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
|
||||
private void setOptions() {
|
||||
if (getContext() == null)
|
||||
return;
|
||||
if (getLifecycle().getCurrentState().equals(Lifecycle.State.DESTROYED))
|
||||
if (view == null || getContext() == null)
|
||||
return;
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
Reference in New Issue
Block a user