fix for MODAPP-66

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7053 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-01-02 02:57:56 +00:00
parent 77f931393f
commit da7e43ccbd
1 changed files with 2 additions and 2 deletions

View File

@ -688,7 +688,7 @@ static void terminate_session(switch_core_session_t **session, int line, switch_
tech_pvt = switch_core_session_get_private(*session);
if (tech_pvt->profile->ip && tech_pvt->local_port) {
if (tech_pvt && tech_pvt->profile && tech_pvt->profile->ip && tech_pvt->local_port) {
switch_rtp_release_port(tech_pvt->profile->ip, tech_pvt->local_port);
}
@ -697,7 +697,7 @@ static void terminate_session(switch_core_session_t **session, int line, switch_
return;
}
if (switch_test_flag(tech_pvt, TFLAG_TERM)) {
if (!tech_pvt || switch_test_flag(tech_pvt, TFLAG_TERM)) {
/*once is enough */
return;
}