[Freeswitch-svn] [commit] r7852 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Mar 10 14:38:01 EDT 2008


Author: anthm
Date: Mon Mar 10 14:38:01 2008
New Revision: 7852

Modified:
   freeswitch/trunk/src/switch_core_session.c

Log:
fix issue

Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c	(original)
+++ freeswitch/trunk/src/switch_core_session.c	Mon Mar 10 14:38:01 2008
@@ -1000,7 +1000,7 @@
 	char *dpstr;
 	int argc, x, count = 0;
 	char *expanded = NULL;
-	switch_caller_profile_t *profile, *new_profile, *pp;
+	switch_caller_profile_t *profile, *new_profile, *pp = NULL;
 	switch_channel_t *channel = switch_core_session_get_channel(session);
 	switch_dialplan_interface_t *dialplan_interface = NULL;
 	switch_caller_extension_t *extension = NULL;
@@ -1062,12 +1062,14 @@
 
 	new_profile->caller_extension = extension;
 
-	for(pp = profile->caller_extension->children; pp && pp->next; pp = pp->next);
-
-	if (pp) {
-		pp->next = new_profile;
-	} else {
-		profile->caller_extension->children = new_profile;
+	if (profile->caller_extension) {
+		for(pp = profile->caller_extension->children; pp && pp->next; pp = pp->next);
+ 
+		if (pp) {
+			pp->next = new_profile;
+		} else {
+			profile->caller_extension->children = new_profile;
+		}
 	}
 
 	while (switch_channel_ready(channel) && extension->current_application) {



More information about the Freeswitch-svn mailing list