server: Fix for possible desktop variable being NULL when set_process_default_desktop is called

Alexandre Julliard julliard at winehq.org
Fri Apr 7 06:23:15 CDT 2006


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.

>>    {
>>        desktop = get_desktop_obj( process, handle, 0 );
>>        *if* (!desktop || desktop->winstation != winstation) *goto* done;
>>    }
>>    *else* *if* (parent && parent->desktop)
>>    {
>>        desktop = get_desktop_obj( parent->process, parent->desktop, 0 );
>>        *if* (!desktop || desktop->winstation != winstation) *goto* done;
>>        handle = duplicate_handle( parent->process, parent->desktop,
>>                                   process, 0, 0, DUP_HANDLE_SAME_ACCESS );
>>    }
>>  
>>
>
> If the process neither has desktop nor its parent has a desktop then
> handle will be non-NULL here, yet desktop will be NULL.

I still don't see how. It wouldn't make sense since the handle and
desktop are supposed to be the same object.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list