Check for rtcp structure before trying to delete schedule.

(closes issue #12872)
 Reported by: destiny6628
 Patches: 
       20080621__bug12872.diff.txt uploaded by Corydon76 (license 14)
 Tested by: destiny6628


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@125276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-06-26 11:01:21 +00:00
parent 40784f499c
commit 9b4a5d8310

View File

@@ -2045,7 +2045,9 @@ struct ast_rtp *ast_rtp_get_bridged(struct ast_rtp *rtp)
void ast_rtp_stop(struct ast_rtp *rtp)
{
AST_SCHED_DEL(rtp->sched, rtp->rtcp->schedid);
if (rtp->rtcp) {
AST_SCHED_DEL(rtp->sched, rtp->rtcp->schedid);
}
memset(&rtp->them.sin_addr, 0, sizeof(rtp->them.sin_addr));
memset(&rtp->them.sin_port, 0, sizeof(rtp->them.sin_port));