mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 05:34:27 +00:00

When loading a sound effect, the engine would deallocate the memory for the currently playing sound effect, and stop playback afterwards. This commit changes this to stop playback first, and then deallocate and load the new sound effect. This should fix the problem with the mixer accessing deallocated memory reported in issue #12852.