mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fixed invoking a virtual method (onSeek) in the destructor of SoundStream.
This commit is contained in:
parent
74e425a9ed
commit
57941c1696
@ -59,7 +59,15 @@ m_samplesProcessed(0)
|
||||
SoundStream::~SoundStream()
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user