1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-02-17 11:08:41 +01:00

Fixing RegCloseKey invalid handle

This commit is contained in:
justanotheranonymoususer 2021-10-10 09:07:46 +03:00
parent 92f5e9084e
commit 3012ced8ff

View File

@ -723,6 +723,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
if (hKey)
{
RegCloseKey(hKey);
hKey = NULL;
RegDeleteKeyExW(
HKEY_CURRENT_USER,
wcschr(section, L'\\') + 1,
@ -799,7 +800,10 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
}
InvalidateRect(hwnd, NULL, FALSE);
}
RegCloseKey(hKey);
if (hKey)
{
RegCloseKey(hKey);
}
if (bChoice)
{
for (unsigned int i = 0; i < numChoices; ++i)