mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Prevent crash
This commit is contained in:
@@ -70,6 +70,7 @@ import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
@@ -1663,6 +1664,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
private void setOptions() {
|
||||
if (getContext() == null)
|
||||
return;
|
||||
if (getLifecycle().getCurrentState().equals(Lifecycle.State.DESTROYED))
|
||||
return;
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user