server: Avoid crash in set_thread_desktop if the thread doesn't have a queue.
diff --git a/server/winstation.c b/server/winstation.c
index 30cbe18..da24be4 100644
--- a/server/winstation.c
+++ b/server/winstation.c
@@ -477,7 +477,7 @@
else
current->desktop = req->handle; /* FIXME: should we close the old one? */
- if (old_desktop != new_desktop) detach_thread_input( current );
+ if (old_desktop != new_desktop && current->queue) detach_thread_input( current );
if (old_desktop) release_object( old_desktop );
release_object( new_desktop );