From: Michael Jerris Date: Wed, 28 Mar 2007 12:30:20 +0000 (+0000) Subject: fix seg. X-Git-Tag: v1.0-beta1~663 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34359cb61c45d67b4e3605f071e7571bbb2d929e;p=thirdparty%2Ffreeswitch.git fix seg. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4777 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_channel.c b/src/switch_channel.c index d4a4f6aaa3..e5aed3f1c7 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -948,11 +948,13 @@ SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel_t *chann SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_caller_extension(switch_channel_t *channel) { - switch_caller_extension_t *extension; + switch_caller_extension_t *extension = NULL; assert(channel != NULL); switch_mutex_lock(channel->profile_mutex); - extension = channel->caller_profile->caller_extension; + if (channel->caller_profile) { + extension = channel->caller_profile->caller_extension; + } switch_mutex_unlock(channel->profile_mutex); return extension; }