From: Kapil Date: Tue, 31 Jul 2012 13:26:46 +0000 (-0400) Subject: adding safe check for term ptr X-Git-Tag: v1.2.3^2~71^2^2~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7421bcfb3431ebe3c60b5e08e7482a598230b5c3;p=thirdparty%2Ffreeswitch.git adding safe check for term ptr --- diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c b/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c index b4b3663fa4..1f883a6740 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway_utils.c @@ -85,7 +85,7 @@ switch_status_t mg_stack_termination_is_in_service(megaco_profile_t* mg_profile, { mg_termination_t* term = NULL; term = megaco_find_termination(mg_profile, term_str); - if(switch_test_flag(term, MG_IN_SERVICE)){ + if(term && switch_test_flag(term, MG_IN_SERVICE)){ return SWITCH_STATUS_SUCCESS; } else { return SWITCH_STATUS_FALSE;