From: Tilghman Lesher Date: Sun, 7 Jan 2007 21:43:10 +0000 (+0000) Subject: If openstream fails, then we crash (Issue 8564) X-Git-Tag: 1.2.15~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be0be1b4f168dc78766d4f31fc54dc9d21f45e97;p=thirdparty%2Fasterisk.git If openstream fails, then we crash (Issue 8564) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49833 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_dictate.c b/apps/app_dictate.c index 91a1650eac..c54457360d 100644 --- a/apps/app_dictate.c +++ b/apps/app_dictate.c @@ -257,7 +257,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; }