]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Stop a crash when no peer is passed to masq_park_call.
authorJeff Peeler <jpeeler@digium.com>
Fri, 8 Jan 2010 23:28:37 +0000 (23:28 +0000)
committerJeff Peeler <jpeeler@digium.com>
Fri, 8 Jan 2010 23:28:37 +0000 (23:28 +0000)
(distantly related to issue #16406)

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

res/res_features.c

index c74c87236c834adf9bea34b9c0201c76a0383e43..e5a6179e44414dac40d0ad6be0d30b13f79e27e9 100644 (file)
@@ -590,7 +590,7 @@ static int masq_park_call(struct ast_channel *rchan, struct ast_channel *peer, i
                peer = chan;
        }
 
-       if (!play_announcement || !orig_chan_name) {
+       if (peer && (!play_announcement || !orig_chan_name)) {
                /* chan is the channel being parked, peer is the effective park-er */
                orig_chan_name = ast_strdupa(peer->name);
        }