diff --git a/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java b/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java index b5f4245680..f8bf4b923f 100644 --- a/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java +++ b/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java @@ -220,9 +220,9 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi } if (!recipients.isSingleRecipient() || recipients.isGroupRecipient()) { - this.getPreferenceScreen().removePreference(colorPreference); - this.getPreferenceScreen().removePreference(blockPreference); - this.getPreferenceScreen().removePreference(identityPreference); + if (colorPreference != null) getPreferenceScreen().removePreference(colorPreference); + if (blockPreference != null) getPreferenceScreen().removePreference(blockPreference); + if (identityPreference != null) getPreferenceScreen().removePreference(identityPreference); } else { colorPreference.setChoices(MaterialColors.CONVERSATION_PALETTE.asConversationColorArray(getActivity())); colorPreference.setValue(recipients.getColor().toActionBarColor(getActivity()));