diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 28a59624f6642ed85fc8d0c9699b34ed8491e840..628734dc26638d0ac14fc8cad7b763766dd60f9b 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -3643,8 +3643,8 @@ public class ConversationFragment extends XmppFragment || conversation.getMucOptions().participating(); if (this.conversation.getStatus() != Conversation.STATUS_ARCHIVED && participating - && this.conversation.setNextMessage(msg)) { - this.activity.xmppConnectionService.updateConversation(this.conversation); + && this.conversation.setNextMessage(msg) && activity != null) { + activity.xmppConnectionService.updateConversation(this.conversation); return true; } return false;