diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 67e6b8275..34425eec9 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -302,7 +302,7 @@ public class ConversationFragment extends XmppFragment toggleScrollDownButton(view); synchronized (ConversationFragment.this.messageList) { boolean paginateBackward = firstVisibleItem < 5; - boolean paginationForward = conversation.isInHistoryPart() && firstVisibleItem + visibleItemCount + 5 > totalItemCount; + boolean paginationForward = conversation != null && conversation.isInHistoryPart() && firstVisibleItem + visibleItemCount + 5 > totalItemCount; loadMoreMessages(paginateBackward, paginationForward, view); } }