From: Jeff Peeler Date: Thu, 12 Feb 2009 17:57:10 +0000 (+0000) Subject: Fix crash in event of failed attempt to transfer to parking X-Git-Tag: 1.4.24-rc1~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e396d458ad5eeeae1b28e10e050ead501bbb039;p=thirdparty%2Fasterisk.git 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 --- diff --git a/res/res_features.c b/res/res_features.c index 2161f24461..317b99b5f7 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -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; }