mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Fix seg in chan_agent (bug #5402)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -490,7 +490,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
|
||||
} else {
|
||||
/* if acknowledgement is not required, and the channel is up, we may have missed
|
||||
an AST_CONTROL_ANSWER (if there was one), so mark the call acknowledged anyway */
|
||||
if (!p->ackcall && !p->acknowledged && p->chan->_state == AST_STATE_UP)
|
||||
if (!p->ackcall && !p->acknowledged && p->chan && (p->chan->_state == AST_STATE_UP))
|
||||
p->acknowledged = 1;
|
||||
switch (f->frametype) {
|
||||
case AST_FRAME_CONTROL:
|
||||
|
Reference in New Issue
Block a user