diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index fdd6e18815ef4810e41a12ced8a1820aa6130f83..7eb5e9fe9129efc1afea0b86300be02bbf437719 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -767,7 +767,7 @@ public class ConversationFragment extends XmppFragment return i; } else { Message next = messages.get(i); - while (next != null && next.wasMergedIntoPrevious(activity.xmppConnectionService)) { + while (next != null && next.wasMergedIntoPrevious(activity == null ? null : activity.xmppConnectionService)) { if (uuid.equals(next.getUuid())) { return i; }