From 64435ef25fb52a9113b6c73619c80bc072372950 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 16 Dec 2014 19:40:27 +0100 Subject: ACCESS: Fix cmdFreeSound, which fixes the sound played during the death animation --- engines/access/scripts.cpp | 8 +++++--- 1 file 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); + } } } -- cgit v1.2.3