diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index b374e1730..9321c4809 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1826,6 +1826,10 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke @Override public void refresh() { + if (this.binding == null) { + Log.d(Config.LOGTAG,"ConversationFragment.refresh() skipped updated because view binding was null"); + return; + } this.refresh(true); } diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java index 3673065a5..db47bc0b9 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java @@ -154,6 +154,10 @@ public class ConversationsOverviewFragment extends XmppFragment implements Enhan @Override void refresh() { + if (this.binding == null || this.activity == null) { + Log.d(Config.LOGTAG,"ConversationsOverviewFragment.refresh() skipped updated because view binding or activity was null"); + return; + } this.activity.xmppConnectionService.populateWithOrderedConversations(this.conversations); Conversation removed = this.swipedConversation.peek(); if (removed != null) {