diff options
Diffstat (limited to 'src/sound.cpp')
-rw-r--r-- | src/sound.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sound.cpp b/src/sound.cpp index a9157af1b..92a5eaa6f 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -67,6 +67,9 @@ Sound::~Sound() config.removeListener("playBattleSound", this); config.removeListener("playGuiSound", this); config.removeListener("playMusic", this); + + // Unlink the callback function. + Mix_HookMusicFinished(NULL); } void Sound::optionChanged(const std::string &value) @@ -77,8 +80,6 @@ void Sound::optionChanged(const std::string &value) mPlayGui = config.getBoolValue("playGuiSound"); else if (value == "playMusic") mPlayMusic = config.getBoolValue("playMusic"); - // Unlink the callback function. - Mix_HookMusicFinished(NULL); } void Sound::init() |