Check for valid pthread object to avoid deletion of Nullpthread.
2002-09-25 Thomas Pfaff <[EMAIL PROTECTED]>
* thread.cc (pthread::destructor): Check for valid pthread object
prior to delete.
diff -urp src.old/winsup/cygwin/thread.cc src/winsup/cygwin/thread.cc
--- src.old/winsup/cygwin/thread.cc Wed Sep 25 09:22:03 2002
+++ src/winsup/cygwin/thread.cc Wed Sep 25 09:55:09 2002
@@ -248,7 +248,7 @@ pthread::destructor (void *value)
{
pthread *thread = (pthread *) value;
/* cleanup thread if thread is detached and not joined */
- if (thread && __pthread_equal(&thread->joiner, &thread))
+ if (isGoodObject (&thread) && __pthread_equal(&thread->joiner, &thread))
delete thread;
}