fix for MODLANG-38

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5562 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-08-03 16:13:32 +00:00
parent 0a088c7e68
commit f85f71390b
1 changed files with 5 additions and 5 deletions

View File

@ -2311,7 +2311,7 @@ static JSBool session_originate(JSContext * cx, JSObject * obj, uintN argc, jsva
if (JS_ValueToObject(cx, argv[0], &session_obj)) {
struct js_session *old_jss = NULL;
if ((old_jss = JS_GetPrivate(cx, session_obj))) {
if ((old_jss = JS_GetPrivate(cx, session_obj)) && old_jss->session) {
session = old_jss->session;
orig_caller_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(session));
dialplan = orig_caller_profile->dialplan;