]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't fixup if there's nothing to fixup
authorOlle Johansson <oej@edvina.net>
Thu, 16 Nov 2006 16:51:59 +0000 (16:51 +0000)
committerOlle Johansson <oej@edvina.net>
Thu, 16 Nov 2006 16:51:59 +0000 (16:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47744 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index e480ad70f19bf143393d6455b1086806017b264c..1d01da5f8e3857cc5c1c01d1837d1cc41392b8ad 100644 (file)
@@ -3507,6 +3507,11 @@ static int sip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
        }
        p = newchan->tech_pvt;
 
+       if (!p) {
+               ast_log(LOG_WARNING, "No pvt after masquerade. Strange things may happen\n");
+               return -1;
+       }
+
        ast_mutex_lock(&p->lock);
        append_history(p, "Masq", "Old channel: %s\n", oldchan->name);
        append_history(p, "Masq (cont)", "...new owner: %s\n", newchan->name);