Merged revisions 164350 via svnmerge from
[asterisk/asterisk.git] / channels / chan_sip.c
index 37ae2ca..30d611c 100644 (file)
@@ -18371,7 +18371,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
                        sip_pvt_unlock(p);
                        if (p->refer->refer_call) {
                                sip_pvt_unlock(p->refer->refer_call);
-                               ast_channel_unlock(p->refer->refer_call->owner);
+                               if (p->refer->refer_call->owner) {
+                                       ast_channel_unlock(p->refer->refer_call->owner);
+                               }
                        }
                        p->invitestate = INV_COMPLETED;
                        return -1;