diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-03-31 14:43:11 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-03-31 14:43:11 +0200 |
commit | e4523b6d7b6aed25e896b59f23b31d2a6b858744 (patch) | |
tree | 53ce3524d868758d099eff39c5eacd7384e91dbf /src/main/java/de | |
parent | 362eddae27568674e78aa4968b1a4165cd67f517 (diff) |
skip refresh if binding is missing
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 4 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index e310ed089..3ea9bfe5b 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -2120,6 +2120,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/de/pixart/messenger/ui/ConversationsOverviewFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java index 6242e80a9..e5e5f509d 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsOverviewFragment.java @@ -146,6 +146,10 @@ public class ConversationsOverviewFragment extends XmppFragment { @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); this.conversationsAdapter.notifyDataSetChanged(); } |