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; }