shlwapi: Don't bother trying to duplicate nil handle

Olivier F. R. Dierick o.dierick at piezo-forte.be
Wed Nov 25 01:17:23 CST 2015


Fix one of the error leak source that prevents the installer to succeed
(bug 36838).

The original code did try to duplicate the handle even though it is
null, and that causes last error to be set to ERROR_INVALID_HANDLE. The
game installer chokes at some point when the last error is anything but
zero and fails to complete the installation. Returning a null handle
value is sufficient to indicate that error condition. The SHMapHandle is
not supposed to set last error on failure.

Signed-off-by: Olivier F. R. Dierick <o.dierick at piezo-forte.be>
---
 dlls/shlwapi/ordinal.c |    3 +++
 1 file changed, 3 insertions(+)

-- 
        Olivier F. R. Dierick
        o.dierick at piezo-forte.be
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Don-t-bother-trying-to-duplicate-nil-handle.patch
Type: application/mbox
Size: 858 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20151125/1c990846/attachment.mbox>


More information about the wine-patches mailing list