]> 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:27 +0000 (20:40 +0500)
src/switch_channel.c

index d9831107919f85bc9270012f331452e4f6341341..bfd20abc91f954d81878a82098e8eee1735321ab 100644 (file)
@@ -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;
 }