Fix a crash that can occur on a transfer in chan_sip when attempting to collect
authorMatthew Nicholson <mnicholson@digium.com>
Mon, 8 Dec 2008 17:23:41 +0000 (17:23 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Mon, 8 Dec 2008 17:23:41 +0000 (17:23 +0000)
rtp stats.

(closes issue #13956)
Reported by: chris-mac
Tested by: chris-mac

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161721 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index e230c51..474e879 100644 (file)
@@ -5556,7 +5556,7 @@ static int sip_hangup(struct ast_channel *ast)
                                if (bridge) {
                                        struct sip_pvt *q = bridge->tech_pvt;
 
-                                       if (IS_SIP_TECH(bridge->tech) && q->rtp)
+                                       if (IS_SIP_TECH(bridge->tech) && q)
                                                ast_rtp_set_vars(bridge, q->rtp);
                                }