Commit f6662576 authored by François Gouget's avatar François Gouget Committed by Alexandre Julliard

Don't suspend a terminated thread.

parent 047ab406
......@@ -905,7 +905,8 @@ DECL_HANDLER(suspend_thread)
if ((thread = get_thread_from_handle( req->handle, THREAD_SUSPEND_RESUME )))
{
reply->count = suspend_thread( thread, 1 );
if (thread->state == TERMINATED) set_error( STATUS_ACCESS_DENIED );
else reply->count = suspend_thread( thread, 1 );
release_object( thread );
}
}
......@@ -917,7 +918,8 @@ DECL_HANDLER(resume_thread)
if ((thread = get_thread_from_handle( req->handle, THREAD_SUSPEND_RESUME )))
{
reply->count = resume_thread( thread );
if (thread->state == TERMINATED) set_error( STATUS_ACCESS_DENIED );
else reply->count = resume_thread( thread );
release_object( thread );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment