aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 4f5d2892c..2082c6664 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -705,8 +705,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
}
private ScrollState getScrollPosition() {
- final ListView listView = this.binding.messagesView;
- if (listView.getCount() == 0 || listView.getLastVisiblePosition() == listView.getCount() - 1) {
+ final ListView listView = this.binding == null ? null : this.binding.messagesView;
+ if (listView == null || listView.getCount() == 0 || listView.getLastVisiblePosition() == listView.getCount() - 1) {
return null;
} else {
final int pos = listView.getFirstVisiblePosition();