From baca8e33ab07b6d689838ca753191be40de01636 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Aug 2004 23:28:33 +0000 Subject: [PATCH] fix crash if a thread is started before LOG --- stepmania/src/RageThreads.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageThreads.cpp b/stepmania/src/RageThreads.cpp index a5980ce21b..6b667a5b00 100644 --- a/stepmania/src/RageThreads.cpp +++ b/stepmania/src/RageThreads.cpp @@ -220,7 +220,8 @@ void RageThread::Create( int (*fn)(void *), void *data ) if( name == "" ) { - LOG->Warn("Created a thread without naming it first."); + if( LOG ) + LOG->Warn("Created a thread without naming it first."); /* If you don't name it, I will: */ strcpy( m_pSlot->name, "Joe" ); @@ -228,7 +229,8 @@ void RageThread::Create( int (*fn)(void *), void *data ) strcpy( m_pSlot->name, name.c_str() ); } - LOG->Trace( "Starting thread: %s", name.c_str() ); + if( LOG ) + LOG->Trace( "Starting thread: %s", name.c_str() ); sprintf( m_pSlot->ThreadFormattedOutput, "Thread: %s", name.c_str() ); /* Start a thread using our own startup function. We pass the id to fill in,