From aab1b6e087a72a29051b43d438850ec13156c4bf Mon Sep 17 00:00:00 2001 From: Mike Keesey Date: Sun, 14 Jul 2013 15:59:43 -0600 Subject: [PATCH] Adding another possible case for addThread to expect. One common case that triggers is is when both arguments to addThread are the same thread (such as the call from attachThread). SWT on darwin seems to do this for dialog boxes. --- src/avian/machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/avian/machine.h b/src/avian/machine.h index 3fd18d06b5..3ae45687b7 100644 --- a/src/avian/machine.h +++ b/src/avian/machine.h @@ -1995,7 +1995,7 @@ addThread(Thread* t, Thread* p) ACQUIRE_RAW(t, t->m->stateLock); assert(t, p->state == Thread::NoState); - expect(t, t->state == Thread::ActiveState || t->state == Thread::ExclusiveState); + expect(t, t->state == Thread::ActiveState || t->state == Thread::ExclusiveState || t->state == Thread::NoState); p->state = Thread::IdleState; ++ t->m->threadCount;