winemac.drv: Set hkey to NULL after RegCloseKey() in macdrv_init_gpu().
Although it's unlikely, RegCloseKey() may close an already closed key if the following SetupDiGetDeviceRegistryPropertyW() failed. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
82938e833f
commit
5b7397bb27
|
@ -1601,6 +1601,7 @@ static BOOL macdrv_init_gpu(HDEVINFO devinfo, const struct macdrv_gpu *gpu, int
|
||||||
if (RegSetValueExW(hkey, dac_typeW, 0, REG_BINARY, (const BYTE *)ramdacW, sizeof(ramdacW)))
|
if (RegSetValueExW(hkey, dac_typeW, 0, REG_BINARY, (const BYTE *)ramdacW, sizeof(ramdacW)))
|
||||||
goto done;
|
goto done;
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
hkey = NULL;
|
||||||
|
|
||||||
/* Retrieve driver value for adapters */
|
/* Retrieve driver value for adapters */
|
||||||
if (!SetupDiGetDeviceRegistryPropertyW(devinfo, &device_data, SPDRP_DRIVER, NULL, (BYTE *)bufferW, sizeof(bufferW),
|
if (!SetupDiGetDeviceRegistryPropertyW(devinfo, &device_data, SPDRP_DRIVER, NULL, (BYTE *)bufferW, sizeof(bufferW),
|
||||||
|
|
Loading…
Reference in New Issue