diff options
author | Joshua Colp <jcolp@digium.com> | 2013-10-02 18:44:48 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-10-02 18:44:48 +0000 |
commit | 51a9b93a14eab35cf50c9a4b2b3fe7f466377b80 (patch) | |
tree | d9e924c977e9fc74986f414c32686d46af747448 | |
parent | e2204a1e61da013c5d07349078bd4695dfd173d0 (diff) |
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.
........
Merged revisions 400284 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | res/res_pjsip_t38.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index 2f36dfffb..285e9015e 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; } |