mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 20:38:59 +00:00
Merged revisions 185197 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r185197 | file | 2009-03-31 11:07:36 -0300 (Tue, 31 Mar 2009) | 15 lines Merged revisions 185196 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185196 | file | 2009-03-31 11:06:39 -0300 (Tue, 31 Mar 2009) | 8 lines Fix crash when moving audiohooks between channels. Handle the scenario where we are called to move audiohooks between channels and the source channel does not actually have any on it. (closes issue #14734) Reported by: corruptor ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@185198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -441,9 +441,9 @@ static struct ast_audiohook *find_audiohook_by_source(struct ast_audiohook_list
|
||||
|
||||
void ast_audiohook_move_by_source(struct ast_channel *old_chan, struct ast_channel *new_chan, const char *source)
|
||||
{
|
||||
struct ast_audiohook *audiohook = find_audiohook_by_source(old_chan->audiohooks, source);
|
||||
struct ast_audiohook *audiohook;
|
||||
|
||||
if (!audiohook) {
|
||||
if (!old_chan->audiohooks || !(audiohook = find_audiohook_by_source(old_chan->audiohooks, source))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user