diff --git a/nonlib/Thread.C b/nonlib/Thread.C index 6f2227b..6e5b953 100644 --- a/nonlib/Thread.C +++ b/nonlib/Thread.C @@ -129,7 +129,11 @@ Thread::cancel ( void ) void Thread::join ( void ) { - pthread_join( _thread, NULL ); + if ( _thread != 0 ) + { + /* not joined yet, go ahead. */ + pthread_join( _thread, NULL ); + } _thread = 0; }