diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-13 18:08:02 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-13 18:08:02 +0000 |
commit | 0a1cf723f32d373261f464b15fa58b1ec05e44d8 (patch) | |
tree | f697b1d361eee39c1575dd6c936b31ef00a77723 /apps/app_speech_utils.c | |
parent | 46d60c78d24615a850023b9a843cb00bd753b58c (diff) |
Do not bother looking for a result if none are present.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61651 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_speech_utils.c')
-rw-r--r-- | apps/app_speech_utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 86b292f2f..ee1ecbaef 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); |