From: Mark Michelson Date: Wed, 20 Aug 2008 15:37:56 +0000 (+0000) Subject: sip_read should properly handle a NULL return from sip_rtp_read. X-Git-Tag: 1.4.22-rc2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=719645a4a65826dfc1af18423c305a85c787b777;p=thirdparty%2Fasterisk.git sip_read should properly handle a NULL return from sip_rtp_read. (closes issue #13257) Reported by: travishein git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139015 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 133ca32042..193d2a98ae 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4401,7 +4401,7 @@ static struct ast_frame *sip_read(struct ast_channel *ast) } /* Only allow audio through if they sent progress with SDP, or if the channel is actually answered */ - if (fr->frametype == AST_FRAME_VOICE && p->invitestate != INV_EARLY_MEDIA && ast->_state != AST_STATE_UP) { + if (fr && fr->frametype == AST_FRAME_VOICE && p->invitestate != INV_EARLY_MEDIA && ast->_state != AST_STATE_UP) { fr = &ast_null_frame; }