From: Jason Parker Date: Sun, 7 Jan 2007 07:43:52 +0000 (+0000) Subject: Fix a segfault when using "countries" that don't have a matching zone. X-Git-Tag: 1.6.0-beta1~3^2~3534 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=501213541712f57f4738d31fee0fb0cfe608d0eb;p=thirdparty%2Fasterisk.git Fix a segfault when using "countries" that don't have a matching zone. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49769 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/indications.c b/main/indications.c index bd0e3bd54c..c58a51660d 100644 --- a/main/indications.c +++ b/main/indications.c @@ -400,6 +400,8 @@ struct ind_tone_zone *ast_get_indication_zone(const char *country) if (!strcasecmp(tz->country, country)) break; } + if (!tz) + break; /* If this is an alias then we have to search yet again otherwise we have found the zonezone */ if (tz->alias && tz->alias[0]) country = tz->alias;