From: "Olivier F. R. Dierick" Subject: shlwapi: Don't bother trying to duplicate nil handle Message-Id: <1448435843.21605.35.camel@piezo3.piezo-forte.be> Date: Wed, 25 Nov 2015 08:17:23 +0100 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 --- dlls/shlwapi/ordinal.c | 3 +++ 1 file changed, 3 insertions(+) -- Olivier F. R. Dierick o.dierick@piezo-forte.be From 025f49f59d64de162fcb0b6d17e2e71376aa79d7 Mon Sep 17 00:00:00 2001 From: "Olivier F. R. Dierick" Date: Mon, 10 Aug 2015 18:07:06 +0200 Subject: Don't bother trying to duplicate nil handle Signed-off-by: Olivier F. R. Dierick --- dlls/shlwapi/ordinal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index df15c40..991fb8c 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -98,6 +98,9 @@ HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId, TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId, dwAccess, dwOptions); + if(!hShared) + return hRet; + /* Get dest process handle */ if (dwDstProcId == dwMyProcId) hDst = GetCurrentProcess(); -- 1.7.10.4