]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6851 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 24 Sep 2014 15:40:22 +0000 (20:40 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 24 Sep 2014 15:40:41 +0000 (20:40 +0500)
src/switch_channel.c

index 5ad2ae08e61165c0522dd3b954f1c5f182e0bc7c..3ae3caa3a40f77805567cc189a3e8d933d7117cd 100644 (file)
@@ -4170,7 +4170,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;
 }