From 52ea03bd8652cd29f3616d4acbb0f5ae4ecb6a77 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Sun, 7 Jan 2007 21:46:38 +0000 Subject: Merged revisions 49834 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r49834 | tilghman | 2007-01-07 15:44:52 -0600 (Sun, 07 Jan 2007) | 10 lines Merged revisions 49833 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r49833 | tilghman | 2007-01-07 15:43:10 -0600 (Sun, 07 Jan 2007) | 2 lines If openstream fails, then we crash (Issue 8564) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49835 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_dictate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3