From 4dce79334dffce8dd8b2ba4aef26e2004e5fa664 Mon Sep 17 00:00:00 2001 From: agrajaghh Date: Sun, 22 Nov 2015 22:09:12 +0100 Subject: [PATCH] fix crash in RecipientPreferenceActivity fixes #4674 closes #4679 // FREEBIE --- .../thoughtcrime/securesms/RecipientPreferenceActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java b/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java index b5f424568..f8bf4b923 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()));