diff options
Diffstat (limited to 'intern/audaspace/OpenAL')
-rw-r--r-- | intern/audaspace/OpenAL/AUD_OpenALDevice.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp index 3b306d89d7b..65b1d3f3b64 100644 --- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp @@ -178,10 +178,14 @@ bool AUD_OpenALDevice::AUD_OpenALHandle::stop() m_device->lock(); + // AUD_XXX Create a reference of our own object so that it doesn't get + // deleted before the end of this function + AUD_Reference<AUD_OpenALHandle> This = this; + if(m_status == AUD_STATUS_PLAYING) - m_device->m_playingSounds.remove(this); + m_device->m_playingSounds.remove(This); else - m_device->m_pausedSounds.remove(this); + m_device->m_pausedSounds.remove(This); m_device->unlock(); |