summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dictate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_dictate.c b/apps/app_dictate.c
index 661a4a237..55d8ba96c 100644
--- a/apps/app_dictate.c
+++ b/apps/app_dictate.c
@@ -267,7 +267,8 @@ static int dictate_exec(struct ast_channel *chan, void *data)
if (lastop != DFLAG_PLAY) {
lastop = DFLAG_PLAY;
ast_closestream(fs);
- fs = ast_openstream(chan, path, chan->language);
+ if (!(fs = ast_openstream(chan, path, chan->language)))
+ break;
ast_seekstream(fs, samples, SEEK_SET);
chan->stream = NULL;
}