Alexandre Julliard wrote:
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.
/* 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).