prevent possible seg fault (issue #5502)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-11-01 00:57:42 +00:00
parent 009b812d76
commit 0ead801f25

2
rtp.c
View File

@@ -342,7 +342,7 @@ struct ast_frame *ast_rtcp_read(struct ast_rtp *rtp)
unsigned int rtcpdata[1024];
char iabuf[INET_ADDRSTRLEN];
if (!rtp->rtcp)
if (!rtp || !rtp->rtcp)
return &null_frame;
len = sizeof(sin);