From 7c53dcc4f4e558020f62cd67705b6216d3eb75ed Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 13 Mar 2021 10:51:41 +0100 Subject: [PATCH] fixed NPE when service isnt bound --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index f13b94a8d..4fa4d8185 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -986,7 +986,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke menuCall.setVisible(false); menuOngoingCall.setVisible(false); } else { - final XmppConnectionService service = activity.xmppConnectionService; + final XmppConnectionService service = activity == null ? null : activity.xmppConnectionService; final Optional ongoingRtpSession = service == null ? Optional.absent() : service.getJingleConnectionManager().getOngoingRtpConnection(conversation.getContact()); if (ongoingRtpSession.isPresent()) { menuOngoingCall.setVisible(true);