From c86f96e8564a3709136437f88b83b6160e893b37 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 30 Jun 2014 20:29:06 +0200 Subject: [PATCH] fixed rare npe in verify otr fingerprint dialog --- .../siacs/conversations/ui/ConversationFragment.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index 0255fc049..1e703b48c 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -805,10 +805,12 @@ public class ConversationFragment extends Fragment { @Override public void onClick(View v) { - AlertDialog dialog = UIHelper.getVerifyFingerprintDialog( - (ConversationActivity) getActivity(), conversation, - fingerprintWarning); - dialog.show(); + if (conversation.getOtrFingerprint() != null) { + AlertDialog dialog = UIHelper.getVerifyFingerprintDialog( + (ConversationActivity) getActivity(), conversation, + fingerprintWarning); + dialog.show(); + } } }); } else {