diff --git a/src/osx/core/sound.cpp b/src/osx/core/sound.cpp index 1c5ec6e2dc..e81a4d7826 100644 --- a/src/osx/core/sound.cpp +++ b/src/osx/core/sound.cpp @@ -58,6 +58,7 @@ wxOSXAudioToolboxSoundData::wxOSXAudioToolboxSoundData(SystemSoundID soundID) : wxOSXAudioToolboxSoundData::~wxOSXAudioToolboxSoundData() { DoStop(); + AudioServicesDisposeSystemSoundID (m_soundID); } void @@ -95,8 +96,6 @@ void wxOSXAudioToolboxSoundData::DoStop() { m_playing = false; AudioServicesRemoveSystemSoundCompletion(m_soundID); - AudioServicesDisposeSystemSoundID (m_soundID); - wxSound::SoundStopped(this); } }