From b6c090995d9464643f93ac5bc34480cfaf263f71 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 3 Apr 2004 01:23:07 +0000 Subject: [PATCH] fix "Assertion 'thr != NULL' failed" --- .../Sound/RageSoundDriver_Generic_Software.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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(); + } } /*