diff options
author | Strangerke | 2014-12-16 19:40:27 +0100 |
---|---|---|
committer | Strangerke | 2014-12-16 19:40:27 +0100 |
commit | 64435ef25fb52a9113b6c73619c80bc072372950 (patch) | |
tree | 43ffd32d12fda0f636d2652541f76c58b2c67a1c /engines | |
parent | 8120cbfde316ce344d11bcdfac18222414965d8a (diff) | |
download | scummvm-rg350-64435ef25fb52a9113b6c73619c80bc072372950.tar.gz scummvm-rg350-64435ef25fb52a9113b6c73619c80bc072372950.tar.bz2 scummvm-rg350-64435ef25fb52a9113b6c73619c80bc072372950.zip |
ACCESS: Fix cmdFreeSound, which fixes the sound played during the death animation
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/scripts.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index d8f9a51e8f..b1cc2897ce 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -792,9 +792,11 @@ void Scripts::cmdFreeSound() { _vm->_events->pollEvents(); } while (!_vm->shouldQuit() && sound._playingSound); - // Free the sound - delete sound._soundTable[0]._res; - sound._soundTable.remove_at(0); + // Free the sounds + while (sound._soundTable.size() > 0) { + delete sound._soundTable[0]._res; + sound._soundTable.remove_at(0); + } } } |