From 8a585910675d9365bd9fa8002acca1568bbe6921 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Mon, 23 Mar 2015 18:01:39 -0700 Subject: [PATCH] Timeline: Don't attempt to join thread that hasn't been created. Closes: #154 --- nonlib/Thread.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; }