aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-26 11:01:21 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-26 11:01:21 +0000
commitf100c675f02b077c101dda98a87852d756ef2d91 (patch)
tree17d3da143e7785337090b917446b0b5b99ff6eab /main/rtp.c
parent8f8c9e0b57c8a4c6cc68870942c64f9db6790dee (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@125276 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 2597fb178..f18b86ed7 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -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));