diff --git a/main/rtp.c b/main/rtp.c index 9dd40bf900..8fd056250e 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -2525,6 +2525,9 @@ static int ast_rtcp_write(void *data) struct ast_rtp *rtp = data; int res; + if (!rtp || !rtp->rtcp) + return 0; + if (rtp->txcount > rtp->rtcp->lastsrtxcount) res = ast_rtcp_write_sr(data); else