aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/scripts.cpp8
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);
+ }
}
}