From 4efe647169f3099a3c795b58a75d5d53ecaf9598 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Tue, 17 Jan 2006 18:29:57 +0000 Subject: [PATCH] Backport of fix for #6094 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8134 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_features.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/res/res_features.c b/res/res_features.c index 6e4a0ac2c9..bf23129ae4 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1280,10 +1280,12 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast if (!(monitor_app = pbx_findapp("Monitor"))) monitor_ok=0; } - if ((monitor_exec = pbx_builtin_getvar_helper(chan, "AUTO_MONITOR"))) - pbx_exec(chan, monitor_app, monitor_exec, 1); - else if ((monitor_exec = pbx_builtin_getvar_helper(peer, "AUTO_MONITOR"))) - pbx_exec(peer, monitor_app, monitor_exec, 1); + if (monitor_app) { + if ((monitor_exec = pbx_builtin_getvar_helper(chan, "AUTO_MONITOR"))) + pbx_exec(chan, monitor_app, monitor_exec, 1); + else if ((monitor_exec = pbx_builtin_getvar_helper(peer, "AUTO_MONITOR"))) + pbx_exec(peer, monitor_app, monitor_exec, 1); + } } set_config_flags(chan, peer, config);