diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/TrackWrapper.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/TrackWrapper.java index e62aa18fd..16e89ca3b 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/TrackWrapper.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/TrackWrapper.java @@ -65,8 +65,14 @@ class TrackWrapper { public static RtpTransceiver getTransceiver( @Nonnull final PeerConnection peerConnection, final TrackWrapper trackWrapper) { final RtpSender rtpSender = trackWrapper.rtpSender; + final String rtpSenderId; + try { + rtpSenderId = rtpSender.id(); + } catch (final IllegalStateException e) { + return null; + } for (final RtpTransceiver transceiver : peerConnection.getTransceivers()) { - if (transceiver.getSender().id().equals(rtpSender.id())) { + if (transceiver.getSender().id().equals(rtpSenderId)) { return transceiver; } }