From e4f3b148b6903dda729a151621d9b24e96b23a99 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 27 Mar 2024 15:11:36 +0100 Subject: [PATCH] Fix NPE --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 5291eb9f0b..f3b2f65ff5 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -4744,9 +4744,8 @@ public class ConversationFragment extends XmppFragment final boolean participating = conversation.getMode() == Conversational.MODE_SINGLE || conversation.getMucOptions().participating(); if (this.conversation.getStatus() != Conversation.STATUS_ARCHIVED && participating && - this.conversation.setNextMessage(msg) && - Objects.nonNull(activity.xmppConnectionService)) { - this.activity.xmppConnectionService.updateConversation(this.conversation); + this.conversation.setNextMessage(msg) && activity != null) { + activity.xmppConnectionService.updateConversation(this.conversation); return true; } return false;