From 8b2b0278c9d0be03b5c25ca3125b620992588091 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Tue, 22 Jun 2004 13:53:45 +0000 Subject: Make sure outgoing is not NULL git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3270 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_dial.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'apps/app_dial.c') 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); -- cgit v1.2.3