From c73425e79a98f99e031d1bfd5f2f79bbd052f74f Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 15 May 2016 23:24:15 +0200 Subject: fixed crash on startup --- .../java/eu/siacs/conversations/ui/ConversationActivity.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 335c5a813..e657441fa 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -564,13 +564,12 @@ public class ConversationActivity extends XmppActivity //hide settings, accounts and updater in all menus except in main window menuUpdater.setVisible(false); - if (this.getSelectedConversation().getMode() == Conversation.MODE_SINGLE) { - menuArchiveMuc.setVisible(false); - } else { - menuArchiveChat.setVisible(false); - } - if (this.getSelectedConversation() != null) { + if (this.getSelectedConversation().getMode() == Conversation.MODE_SINGLE) { + menuArchiveMuc.setVisible(false); + } else { + menuArchiveChat.setVisible(false); + } if (this.getSelectedConversation().getNextEncryption() != Message.ENCRYPTION_NONE) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { menuSecure.setIcon(R.drawable.ic_lock_white_24dp); -- cgit v1.2.3