From 4aef89420e86fa94d4984e0ba2bd6bddb34f97bc Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 17 Dec 2008 22:45:21 +0000 Subject: [PATCH] avoiding seg git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10863 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c b/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c index a863641fab..fa90f9f2cb 100644 --- a/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c +++ b/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c @@ -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);