fixed NPE when service isnt bound
This commit is contained in:
parent
bf9d1a5759
commit
7c53dcc4f4
|
@ -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> ongoingRtpSession = service == null ? Optional.absent() : service.getJingleConnectionManager().getOngoingRtpConnection(conversation.getContact());
|
||||
if (ongoingRtpSession.isPresent()) {
|
||||
menuOngoingCall.setVisible(true);
|
||||
|
|
Loading…
Reference in New Issue