diff options
author | Max Horn | 2009-11-03 20:49:53 +0000 |
---|---|---|
committer | Max Horn | 2009-11-03 20:49:53 +0000 |
commit | 45308a2bd5e2aa0cff92375fac877a0b1a166d93 (patch) | |
tree | 4c8af68632d9b274c9ce2cf7077363c2a702bcce /sound/audiostream.cpp | |
parent | 0fd0d1a09f5e40c65cb62d2bb4285492d7a96524 (diff) | |
download | scummvm-rg350-45308a2bd5e2aa0cff92375fac877a0b1a166d93.tar.gz scummvm-rg350-45308a2bd5e2aa0cff92375fac877a0b1a166d93.tar.bz2 scummvm-rg350-45308a2bd5e2aa0cff92375fac877a0b1a166d93.zip |
Fix for bug #2890038 (FT: Crashes when entering inventory)
svn-id: r45638
Diffstat (limited to 'sound/audiostream.cpp')
-rw-r--r-- | sound/audiostream.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 783a5733b3..7d3cf935aa 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -220,6 +220,8 @@ public: : _rate(rate), _stream(stream), _beginLoop(beginLoop), _endLoop(endLoop), _disposeAfterUse(disposeStream), _audioBlockCount(numBlocks), _loop(loop) { + assert(numBlocks > 0); + // Allocate streaming buffer if (is16Bit) { _buffer = (byte *)malloc(BUFFER_SIZE * sizeof(int16)); |