aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_speech_utils.c3
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);