Fixed race condition when a thread gets killed right after starting.
diff --git a/server/request.c b/server/request.c
index 855e877..36257c6 100644
--- a/server/request.c
+++ b/server/request.c
@@ -341,7 +341,7 @@
if (data.tid) thread = get_thread_from_id( data.tid );
else thread = (struct thread *)grab_object( process->thread_list );
- if (!thread || thread->process != process)
+ if (!thread || thread->process != process || thread->state == TERMINATED)
{
if (debug_level)
fprintf( stderr, "%08x: *fd* %d <- %d bad thread id\n",