summaryrefslogtreecommitdiff
path: root/main/rtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 691d39160..ca2b01c9b 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2709,6 +2709,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