diff --git a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index c8ea1315b2..269b380dd1 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -303,13 +303,16 @@ RageSound_Generic_Software::RageSound_Generic_Software() RageSound_Generic_Software::~RageSound_Generic_Software() { - /* Signal the mixing thread to quit. */ - shutdown_decode_thread = true; - LOG->Trace("Shutting down decode thread ..."); - LOG->Flush(); - m_DecodeThread.Wait(); - LOG->Trace("Decode thread shut down."); - LOG->Flush(); + /* Signal the decoding thread to quit. */ + if( m_DecodeThread.IsCreated() ) + { + shutdown_decode_thread = true; + LOG->Trace("Shutting down decode thread ..."); + LOG->Flush(); + m_DecodeThread.Wait(); + LOG->Trace("Decode thread shut down."); + LOG->Flush(); + } } /*