server: Avoid crash in set_thread_desktop if the thread doesn't have a queue.

This commit is contained in:
Alexandre Julliard 2006-03-06 15:10:59 +01:00
parent 4be3d4c12b
commit 71b94726d9

View file

@ -477,7 +477,7 @@ DECL_HANDLER(set_thread_desktop)
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 );