mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 19:35:10 +01:00
Prevent crash
This commit is contained in:
@@ -64,6 +64,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FragmentOptionsDisplay extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private View view;
|
||||
private ImageButton ibHelp;
|
||||
private Button btnTheme;
|
||||
private Spinner spStartup;
|
||||
@@ -220,7 +221,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
setSubtitle(R.string.title_setup);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_options_display, container, false);
|
||||
view = inflater.inflate(R.layout.fragment_options_display, container, false);
|
||||
|
||||
// Get controls
|
||||
|
||||
@@ -1331,9 +1332,7 @@ public class FragmentOptionsDisplay 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