Due to usage of ast_hook_send_action, AMI action handling code should
be able to handle a NULL mansession->session. This would cause a crash
on NULL dereference if action_originate was called from
ast_hook_send_action.
(closes issue ASTERISK-20544)
........
Merged revisions 374792 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374793
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
/* Allocate requested channel variables */
vars = astman_get_variables(m);
- if (s->session->chanvars) {
+ if (s->session && s->session->chanvars) {
struct ast_variable *v, *old;
old = vars;
vars = NULL;