Commit 82938e83 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

winex11.drv: Set hkey to NULL after RegCloseKey() in X11DRV_InitGpu().

Although it's unlikely, RegCloseKey() may close an already closed key if the following SetupDiGetDeviceRegistryPropertyW() failed. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d275e68d
......@@ -567,6 +567,7 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g
goto done;
RegCloseKey(hkey);
hkey = NULL;
/* Retrieve driver value for adapters */
if (!SetupDiGetDeviceRegistryPropertyW(devinfo, &device_data, SPDRP_DRIVER, NULL, (BYTE *)bufferW, sizeof(bufferW),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment