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