server: Fix for possible desktop variable being NULL when
set_process_default_desktop is called
Robert Shearman
rob at codeweavers.com
Fri Apr 7 07:07:23 CDT 2006
Alexandre Julliard wrote:
>Robert Shearman <rob at codeweavers.com> writes:
>
>
>
>>Handle is non-NULL here.
>>
>>
>>
>>> *if* ((handle = find_inherited_handle( process, &desktop_ops )))
>>>
>>>
>
>It's set to NULL here if we don't find an inherited handle.
>
>
/* 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).
--
Rob Shearman
More information about the wine-devel
mailing list