Fix crash in PlayStream when whole file is prebuffered and its not

speech (bug #259)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@966 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2003-05-20 00:43:24 +00:00
parent 2c35fa93d9
commit f22e83105b
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -80,7 +80,8 @@ PlayStream (TFB_SoundSample *sample, uint32 source, bool looping, bool scope, bo
if (sample->decoder->error)
{
if (sample->decoder->error == SOUNDDECODER_EOF && sample->read_chain_ptr->next)
if (sample->decoder->error == SOUNDDECODER_EOF &&
sample->read_chain_ptr && sample->read_chain_ptr->next)
{
sample->read_chain_ptr = sample->read_chain_ptr->next;
sample->decoder = sample->read_chain_ptr->decoder;