summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-06-11 21:17:14 +0000
committerMark Michelson <mmichelson@digium.com>2009-06-11 21:17:14 +0000
commit616e85c95f7ff9c226dea9fce10060d5c1fbc5d8 (patch)
tree6d649d874660c93c6da862320a3b9535cd52b8bb
parentdabfa94fdcbdfa75a3c1e74884b7ef6b26d062e1 (diff)
Fix a crash due to a potentially NULL p->options.
Thanks to mnicholson for pointing it out. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-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 0117197b6..23eaa695f 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8971,7 +8971,7 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
* Similarly, if we need to re-send an INVITE with auth credentials, then we
* need to use the same branch as we did the first time we sent the INVITE.
*/
- if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && !ast_strlen_zero(p->options->auth))) {
+ if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && p->options && !ast_strlen_zero(p->options->auth))) {
p->branch = p->invite_branch;
build_via(p);
} else if (newbranch) {