diff options
author | Einar Johan Trøan Sømåen | 2012-08-31 13:11:31 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-08-31 13:11:31 +0200 |
commit | 3fe7f2cbe2b70eaa824b7159d94d40c2280006a3 (patch) | |
tree | ea592da00ad567c75008137f79eeba16c3ba40c4 /engines/lastexpress/sound/queue.cpp | |
parent | 246109839b9c196e9181a6f619c15694456b9aec (diff) | |
parent | 10a947a0be80ea8c5c88bd3493a5057b1223ce45 (diff) | |
download | scummvm-rg350-3fe7f2cbe2b70eaa824b7159d94d40c2280006a3.tar.gz scummvm-rg350-3fe7f2cbe2b70eaa824b7159d94d40c2280006a3.tar.bz2 scummvm-rg350-3fe7f2cbe2b70eaa824b7159d94d40c2280006a3.zip |
Merge remote-tracking branch 'origin/master' into wintermute
Diffstat (limited to 'engines/lastexpress/sound/queue.cpp')
-rw-r--r-- | engines/lastexpress/sound/queue.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp index d72acfd8a0..8904b48930 100644 --- a/engines/lastexpress/sound/queue.cpp +++ b/engines/lastexpress/sound/queue.cpp @@ -67,6 +67,8 @@ void SoundQueue::handleTimer() { for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) { SoundEntry *entry = (*i); + if (entry == NULL) + error("[SoundQueue::handleTimer] Invalid entry found in sound queue"); // When the entry has stopped playing, we remove his buffer if (entry->isFinished()) { @@ -123,6 +125,8 @@ void SoundQueue::updateQueue() { for (Common::List<SoundEntry *>::iterator it = _soundList.begin(); it != _soundList.end(); ++it) { SoundEntry *entry = *it; + if (entry == NULL) + error("[SoundQueue::updateQueue] Invalid entry found in sound queue"); // Original removes the entry data from the cache and sets the archive as not loaded // and if the sound data buffer is not full, loads a new entry to be played based on @@ -179,6 +183,8 @@ void SoundQueue::clearQueue() { for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) { SoundEntry *entry = (*i); + if (entry == NULL) + error("[SoundQueue::clearQueue] Invalid entry found in sound queue"); // Delete entry entry->close(); |