diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 83a269026c..ed5f7fcb02 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -4849,7 +4849,7 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t do_dtls(rtp_session, rtp_session->dtls); - if (rtp_session->dtls->bytes) { + if (rtp_session->dtls && rtp_session->dtls->bytes) { *bytes = 0; sync = 1; }