aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-22 13:53:45 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-22 13:53:45 +0000
commitabda2d4bdfba825faf0f79feb5c3ab66c3f2c679 (patch)
tree50477817ed8b88241b759ad34c3a48f867c81122
parent2fbbfca4f41c58816c2e3ecb61daf3ee0b8be02b (diff)
Make sure outgoing is not NULL
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3270 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xapps/app_dial.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 1abe9e266..67f82fd73 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -817,12 +817,14 @@ static int dial_exec(struct ast_channel *chan, void *data)
} else
to = -1;
- if (outgoing->musiconhold) {
- moh=1;
- ast_moh_start(chan, NULL);
- } else if (outgoing->ringbackonly) {
- ast_indicate(chan, AST_CONTROL_RINGING);
- sentringing++;
+ if (outgoing) {
+ if (outgoing->musiconhold) {
+ moh=1;
+ ast_moh_start(chan, NULL);
+ } else if (outgoing->ringbackonly) {
+ ast_indicate(chan, AST_CONTROL_RINGING);
+ sentringing++;
+ }
}
peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect, &sentringing);