From: Anthony Minessale Date: Wed, 24 Sep 2014 15:40:22 +0000 (+0500) Subject: FS-6851 #resolve X-Git-Tag: v1.5.14~16^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c018c28738153349d17397b00beb462d2ce4c7f2;p=thirdparty%2Ffreeswitch.git FS-6851 #resolve --- diff --git a/src/switch_channel.c b/src/switch_channel.c index d983110791..bfd20abc91 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -4203,7 +4203,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_get_variables(switch_channel_t *c { switch_status_t status; switch_mutex_lock(channel->profile_mutex); - status = switch_event_dup(event, channel->variables); + if (channel->variables) { + status = switch_event_dup(event, channel->variables); + } else { + status = switch_event_create(event, SWITCH_EVENT_CHANNEL_DATA); + } switch_mutex_unlock(channel->profile_mutex); return status; }