]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix potential crash
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 7 Aug 2006 20:04:12 +0000 (20:04 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 7 Aug 2006 20:04:12 +0000 (20:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2235 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_portaudio/mod_portaudio.c

index 59823afb1809576468d560b1e3637d0a76e28206..0b6660163bce6b680506b3b55895939ec53bda9a 100644 (file)
@@ -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);