let session.ready property work without throwing exception after a failed originate
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7877 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9bd7596ba7
commit
32536b7189
|
@ -1969,9 +1969,7 @@ static JSBool session_ready(JSContext * cx, JSObject * obj, uintN argc, jsval *
|
|||
{
|
||||
struct js_session *jss = JS_GetPrivate(cx, obj);
|
||||
|
||||
METHOD_SANITY_CHECK();
|
||||
|
||||
*rval = BOOLEAN_TO_JSVAL(switch_channel_ready(switch_core_session_get_channel(jss->session)) ? JS_TRUE : JS_FALSE);
|
||||
*rval = BOOLEAN_TO_JSVAL((jss && jss->session && switch_channel_ready(switch_core_session_get_channel(jss->session))) ? JS_TRUE : JS_FALSE);
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue