Fixed invoking a virtual method (onSeek) in the destructor of SoundStream.

This commit is contained in:
binary1248 2014-07-05 16:19:30 +02:00
parent 74e425a9ed
commit 57941c1696

View File

@ -59,7 +59,15 @@ m_samplesProcessed(0)
SoundStream::~SoundStream() SoundStream::~SoundStream()
{ {
// Stop the sound if it was playing // Stop the sound if it was playing
stop();
// Request the thread to terminate
{
Lock lock(m_threadMutex);
m_isStreaming = false;
}
// Wait for the thread to terminate
m_thread.wait();
} }