avoiding seg

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10863 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-12-17 22:45:21 +00:00
parent 1ad27943ad
commit 4aef89420e

View File

@ -343,7 +343,9 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
}
}
if (profile->caller_extension && profile->caller_extension->last_application->application_name) {
if (profile->caller_extension &&
profile->caller_extension->last_application &&
profile->caller_extension->last_application->application_name) {
if (rc_avpair_add(rad_config, &send, PW_FS_LASTAPP,
(void *) profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed adding Freeswitch-Lastapp: %s\n", profile->source);