From 2442dabb2a3cff81530869d39b23662df4a6bc1e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 30 Mar 2018 12:26:10 +0200 Subject: [PATCH] null check for conversation --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 1ee6a6f21..58e23df2c 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -191,10 +191,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } private void toggleScrollDownButton(AbsListView listView) { + if (conversation == null) { + return; + } if (scrolledToBottom(listView)) { lastMessageUuid = null; hideUnreadMessagesCount(); - } else { binding.scrollToBottomButton.setEnabled(true); binding.scrollToBottomButton.setVisibility(View.VISIBLE);