diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp index 7c8dc83fe98..0b77628801f 100644 --- a/engines/tsage/sound.cpp +++ b/engines/tsage/sound.cpp @@ -71,6 +71,14 @@ SoundManager::~SoundManager() { // g_system->getTimerManager()->removeTimerProc(_sfUpdateCallback); } + // Free any allocated voice type structures + for (int idx = 0; idx < SOUND_ARR_SIZE; ++idx) { + if (sfManager()._voiceTypeStructPtrs[idx]) { + delete sfManager()._voiceTypeStructPtrs[idx]; + sfManager()._voiceTypeStructPtrs[idx] = NULL; + } + } + _soundManager = NULL; }