From: Joshua Colp Date: Fri, 13 Apr 2007 18:08:02 +0000 (+0000) Subject: Do not bother looking for a result if none are present. X-Git-Tag: 1.4.7.1~433 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72a00026cd201fdc270da3a48058c24b1ac71abd;p=thirdparty%2Fasterisk.git Do not bother looking for a result if none are present. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61651 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 86b292f2f3..ee1ecbaef9 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -133,6 +133,9 @@ static struct ast_speech_result *find_result(struct ast_speech_result *results, char *tmp = NULL; int nbest_num = 0, wanted_num = 0, i = 0; + if (!result) + return NULL; + if ((tmp = strchr(result_num, '/'))) { *tmp++ = '\0'; nbest_num = atoi(result_num);