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
This commit is contained in:
Tilghman Lesher
2007-01-07 21:43:10 +00:00
parent 2194a0b079
commit be0be1b4f1

View File

@@ -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;
}