]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODENDP-326
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 7 Sep 2010 14:44:08 +0000 (09:44 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 7 Sep 2010 14:44:08 +0000 (09:44 -0500)
src/mod/endpoints/mod_dingaling/mod_dingaling.c

index faa116fbd6ba27050068941946b34969b5690eb2..7558e1b1b8e676f8a15b4725b4ae31470782c18d 100644 (file)
@@ -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);
                }