]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't try to read from an rtcp if there isn't one
authorMark Spencer <markster@digium.com>
Sat, 18 Jun 2005 16:46:44 +0000 (16:46 +0000)
committerMark Spencer <markster@digium.com>
Sat, 18 Jun 2005 16:46:44 +0000 (16:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5934 65c4cc65-6c06-0410-ace0-fbb531ad65f3

rtp.c

diff --git a/rtp.c b/rtp.c
index a9ecd34a7b63aa0914bc3d9504c602e88796a39c..ea0523cd1b1826f5467b3d605cdec9f1b10b447b 100755 (executable)
--- a/rtp.c
+++ b/rtp.c
@@ -325,7 +325,7 @@ struct ast_frame *ast_rtcp_read(struct ast_rtp *rtp)
        unsigned int rtcpdata[1024];
        char iabuf[INET_ADDRSTRLEN];
        
-       if (!rtp)
+       if (!rtp || !rtp->rtcp)
                return &null_frame;
 
        len = sizeof(sin);