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);
|
menuCall.setVisible(false);
|
||||||
menuOngoingCall.setVisible(false);
|
menuOngoingCall.setVisible(false);
|
||||||
} else {
|
} 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());
|
final Optional<OngoingRtpSession> ongoingRtpSession = service == null ? Optional.absent() : service.getJingleConnectionManager().getOngoingRtpConnection(conversation.getContact());
|
||||||
if (ongoingRtpSession.isPresent()) {
|
if (ongoingRtpSession.isPresent()) {
|
||||||
menuOngoingCall.setVisible(true);
|
menuOngoingCall.setVisible(true);
|
||||||
|
|
Loading…
Reference in a new issue