Fix crash in event of failed attempt to transfer to parking

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
This commit is contained in:
Jeff Peeler
2009-02-12 17:57:10 +00:00
parent bfaa341f58
commit 3e396d458a

View 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;
}