thread stuff
authorPhilip Kovacs <pkovacs@users.sourceforge.net>
Sun, 2 Sep 2007 05:08:28 +0000 (05:08 +0000)
committerPhilip Kovacs <pkovacs@users.sourceforge.net>
Sun, 2 Sep 2007 05:08:28 +0000 (05:08 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@961 7f574dfc-610e-0410-a909-a81674777703

src/timed_thread.c

index 81f481e..1dfb085 100644 (file)
@@ -139,7 +139,8 @@ timed_thread_destroy (timed_thread* p_timed_thread, timed_thread** addr_of_p_tim
   pthread_mutex_unlock (&p_timed_thread->runnable_mutex);
 
   /* join the terminating thread */
-  pthread_join (p_timed_thread->thread, NULL);
+  if (p_timed_thread->thread)
+    pthread_join (p_timed_thread->thread, NULL);
 
   /* clean up */
   pthread_attr_destroy (&p_timed_thread->thread_attr);