From 94a673a878c6b0800e9fa3d624427438a371c586 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Wed, 2 Oct 2013 18:42:41 +0000 Subject: [PATCH] Fix a crash in res_pjsip_t38 caused by the wrong assumption that a session will always have a channel. When starting up or shutting down this assumption is false. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400284 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_pjsip_t38.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index 2f36dfffbe..285e9015e6 100644 --- a/res/res_pjsip_t38.c +++ b/res/res_pjsip_t38.c @@ -446,7 +446,8 @@ static void t38_attach_framehook(struct ast_sip_session *session) .event_cb = t38_framehook, }; - if ((ast_channel_state(session->channel) == AST_STATE_UP) || !session->endpoint->media.t38.enabled) { + if (!session->channel || (ast_channel_state(session->channel) == AST_STATE_UP) || + !session->endpoint->media.t38.enabled) { return; } -- 2.47.3