Fix potential crash with recipient preferences.

This commit is contained in:
Greyson Parrelli 2018-08-24 12:00:02 -07:00
parent 96c39ec100
commit ab58eab9f4

View File

@ -443,7 +443,11 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
@Override @Override
public void onModified(final Recipient recipient) { public void onModified(final Recipient recipient) {
Util.runOnMain(() -> setSummaries(recipient)); Util.runOnMain(() -> {
if (getContext() != null && getActivity() != null && !getActivity().isFinishing()) {
setSummaries(recipient);
}
});
} }
private class RingtoneChangeListener implements Preference.OnPreferenceChangeListener { private class RingtoneChangeListener implements Preference.OnPreferenceChangeListener {