From: Mathieu Rene Date: Thu, 10 Mar 2011 00:01:50 +0000 (-0500) Subject: Fix segv X-Git-Tag: v1.2-rc1~171^2~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cb2bad004efad30b7ce3e285e3067a98e6f8b21;p=thirdparty%2Ffreeswitch.git Fix segv --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 78743e6420..92137ea5d8 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -1423,8 +1423,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess } } - switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "ent_originate_aleg_uuid", switch_core_session_get_uuid(session)); - + if (session) { + switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "ent_originate_aleg_uuid", switch_core_session_get_uuid(session)); + } + if (channel) { switch_channel_process_export(channel, NULL, var_event, SWITCH_EXPORT_VARS_VARIABLE); }