diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-02-22 22:02:07 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-02-22 22:02:07 +0100 |
commit | 2e87bea9ad0027f552a4eaa02d9550322c20a436 (patch) | |
tree | 4ad43a3e23f001ed29b79ee4524d6cd629e0708e /src | |
parent | 1ac439b54d09ae908684d81bf0e448b42c17c11f (diff) |
catch small NPE in ConversationFragment
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 0ceb93598..a9bb9319f 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -1125,9 +1125,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa showSnackbar(R.string.this_account_is_disabled, R.string.enable, this.mEnableAccountListener); } else if (conversation.isBlocked()) { showSnackbar(R.string.contact_blocked, R.string.unblock, this.mUnblockClickListener); - } else if (!contact.showInRoster() && contact.getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { + } else if (contact != null && !contact.showInRoster() && contact.getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { showSnackbar(R.string.contact_added_you, R.string.add_back, this.mAddBackClickListener, this.mLongPressBlockListener); - } else if (contact.getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { + } else if (contact != null && contact.getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { showSnackbar(R.string.contact_asks_for_presence_subscription, R.string.allow, this.mAllowPresenceSubscription, this.mLongPressBlockListener); } else if (mode == Conversation.MODE_MULTI && !conversation.getMucOptions().online() |