X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/deb0a11e9907e4834247d7cddebe9edbb71dd34b..bc5c09a3aa3662137da2d781c0b101a598d2650d:/src/osx/carbon/sound.cpp diff --git a/src/osx/carbon/sound.cpp b/src/osx/carbon/sound.cpp index 6de5ccd27e..39bb269856 100644 --- a/src/osx/carbon/sound.cpp +++ b/src/osx/carbon/sound.cpp @@ -100,6 +100,9 @@ void wxOSXSoundManagerSoundData::DoStop() m_pSndChannel = NULL; wxSound::SoundStopped(this); } + + if (IsMarkedForDeletion()) + delete this; } bool wxOSXSoundManagerSoundData::Play(unsigned flags)