]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix crash in event of failed attempt to transfer to parking
authorJeff Peeler <jpeeler@digium.com>
Thu, 12 Feb 2009 17:57:10 +0000 (17:57 +0000)
committerJeff Peeler <jpeeler@digium.com>
Thu, 12 Feb 2009 17:57:10 +0000 (17:57 +0000)
The peer may not necessarily exist, such as in the case of a transfer to
ParkAndAnnounce. In this case don't try to play a sound to it.

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

res/res_features.c

index 2161f2446101f81b729ac30bd578007a42948dc5..317b99b5f7374e8a557b1cc95bc56d973fdfd7c6 100644 (file)
@@ -555,7 +555,8 @@ static int masq_park_call(struct ast_channel *rchan, struct ast_channel *peer, i
        int park_status;
 
        if ((pu = park_space_reserve(rchan)) == NULL) {
-               ast_stream_and_wait(peer, "beeperr", peer->language, "");
+               if (peer)
+                       ast_stream_and_wait(peer, "beeperr", peer->language, "");
                return FEATURE_RETURN_PARKFAILED;
        }