From 8bab6c1f6998894e00bba2de285efb2d7a9af98b Mon Sep 17 00:00:00 2001
From: Joshua Colp <jcolp@digium.com>
Date: Mon, 25 Jun 2007 00:52:03 +0000
Subject: [PATCH] Merged revisions 71412 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r71412 | file | 2007-06-24 20:49:21 -0400 (Sun, 24 Jun 2007) | 2 lines

Check to make sure the channel pointer is present before queueing up an unhold frame on it. (issue #10046 reported by dimas)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_agent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 14572bb933..da862ebefc 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -959,7 +959,7 @@ static struct ast_channel *agent_new(struct agent_pvt *p, int state)
 			ast_mutex_unlock(&p->lock);     /* For other thread to read the condition. */
 			return NULL;
 		}	
-	}
+	} else if (p->chan)
 		ast_indicate(p->chan, AST_CONTROL_UNHOLD);
 	p->owning_app = pthread_self();
 	/* After the above step, there should not be any blockers. */
-- 
GitLab