fix potential crash
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2235 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2b320e25a1
commit
5c5bd833d7
|
@ -964,7 +964,7 @@ static switch_status_t answer_call(char *callid, switch_core_session_t *session,
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tech_pvt = switch_core_hash_find(globals.call_hash, callid)) != 0) {
|
if (callid && (tech_pvt = switch_core_hash_find(globals.call_hash, callid)) != 0) {
|
||||||
channel = switch_core_session_get_channel(tech_pvt->session);
|
channel = switch_core_session_get_channel(tech_pvt->session);
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
switch_set_flag_locked(tech_pvt, TFLAG_ANSWER);
|
switch_set_flag_locked(tech_pvt, TFLAG_ANSWER);
|
||||||
|
|
Loading…
Reference in New Issue