server: Fix for possible desktop variable being NULL when
set_process_default_desktop is called
Alexandre Julliard
julliard at winehq.org
Fri Apr 7 07:26:31 CDT 2006
Robert Shearman <rob at codeweavers.com> writes:
> /* check for an inherited winstation handle (don't ask...) */
> if ((handle = find_inherited_handle( process, &winstation_ops )))
> {
> winstation = (struct winstation *)get_handle_obj( process,
> handle, 0, &winstation_ops );
> }
> else if (parent && parent->process->winstation)
> {
> handle = duplicate_handle( parent->process,
> parent->process->winstation,
> process, 0, 0, DUP_HANDLE_SAME_ACCESS );
> winstation = (struct winstation *)get_handle_obj( process,
> handle, 0, &winstation_ops );
> }
> if (!winstation) goto done;
> process->winstation = handle;
>
> Handle is guaranteed to be non-NULL here, since winstation and handle
> are the same object (well, except if duplicate_handle fails).
Yes, it's non-NULL here, but that's irrelevant since it's reset on the
next line.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list