diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-12 23:27:42 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-12 23:27:42 +0000 |
commit | b730dd07d2f9b4f52a9892dec7ff87c69f161f64 (patch) | |
tree | 113fe797e81d21b6cd77641982c3696f6c8eb880 /channels/chan_sip.c | |
parent | fb9f65d2ff0c4f09fb04786aeeebb08fbccfd60a (diff) |
Don't try to ref authpeer when it isn't set
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275816 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ac3de95f4..750ade278 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -20816,7 +20816,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if (p->relatedpeer) { p->relatedpeer = unref_peer(p->relatedpeer,"unsetting the relatedpeer field in the dialog, before it is set to something else."); } - p->relatedpeer = ref_peer(authpeer, "setting dialog's relatedpeer pointer"); + if (authpeer) { + p->relatedpeer = ref_peer(authpeer, "setting dialog's relatedpeer pointer"); + } /* If T38 is needed but not present, then make it magically appear */ if (ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT) && !p->udptl) { struct sockaddr_in bindaddr_sin_tmp; |