From e3eff8165e64804ea0e2819bdd0fce58bfb3a9a5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 7 Sep 2010 09:44:08 -0500 Subject: [PATCH] MODENDP-326 --- src/mod/endpoints/mod_dingaling/mod_dingaling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c index faa116fbd6..7558e1b1b8 100644 --- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c +++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c @@ -1247,7 +1247,8 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session) tech_pvt->rtp_session = NULL; } - if (globals.auto_nat && tech_pvt->profile->local_network && !switch_check_network_list_ip(tech_pvt->remote_ip, tech_pvt->profile->local_network)) { + if (globals.auto_nat && tech_pvt->profile->local_network && tech_pvt->remote_ip && tech_pvt->profile->local_network && + !switch_check_network_list_ip(tech_pvt->remote_ip, tech_pvt->profile->local_network)) { switch_nat_del_mapping((switch_port_t) tech_pvt->local_port, SWITCH_NAT_UDP); }