Robert Shearman rob@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.