]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Check for rtcp structure before trying to delete schedule.
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 26 Jun 2008 11:01:21 +0000 (11:01 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 26 Jun 2008 11:01:21 +0000 (11:01 +0000)
(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

main/rtp.c

index 2597fb17857466ad760f5558b8f07cef979f0362..f18b86ed790f0794990737e9b9c82990970f48ff 100644 (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));