From: Anthony Minessale Date: Mon, 7 Aug 2006 20:04:12 +0000 (+0000) Subject: fix potential crash X-Git-Tag: v1.0-beta1~2411 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c5bd833d74032bbb5ceaf188f7f5981c3f3a6e5;p=thirdparty%2Ffreeswitch.git fix potential crash git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2235 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 59823afb18..0b6660163b 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -964,7 +964,7 @@ static switch_status_t answer_call(char *callid, switch_core_session_t *session, 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); assert(channel != NULL); switch_set_flag_locked(tech_pvt, TFLAG_ANSWER);