summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-03-18 20:02:26 +0000
committerMark Michelson <mmichelson@digium.com>2008-03-18 20:02:26 +0000
commit8bceb4f2a1000b4397b891a888df3db811cd4ec1 (patch)
tree3fb5d0195cc6c7338830531235845f05ffc90d76 /channels
parentb8fe71d8cb4e433421d026418b524b2f1fb231b5 (diff)
Since a sip request's data field is now a stringfield, we not only have to check
if the string is zero-length, but also if the data field is non-null. (closes issue #12250) Reported by: caio1982 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 36804f157..ef0227ce0 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4763,7 +4763,7 @@ static int sip_hangup(struct ast_channel *ast)
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
/* Start the process if it's not already started */
- if (!p->alreadygone && !ast_strlen_zero(p->initreq.data->str)) {
+ if (!p->alreadygone && p->initreq.data && !ast_strlen_zero(p->initreq.data->str)) {
if (needcancel) { /* Outgoing call, not up */
if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
/* stop retransmitting an INVITE that has not received a response */