Browse Source

Merge pull request #51 from justanotheranonymoususer/RegCloseKey-fix

Fixing RegCloseKey invalid handle
pull/91/head
Valentin-Gabriel Radu 4 years ago committed by GitHub
parent
commit
12e0733c56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ExplorerPatcher/GUI.c

4
ExplorerPatcher/GUI.c

@ -723,6 +723,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) @@ -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) @@ -799,7 +800,10 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
}
InvalidateRect(hwnd, NULL, FALSE);
}
if (hKey)
{
RegCloseKey(hKey);
}
if (bChoice)
{
for (unsigned int i = 0; i < numChoices; ++i)

Loading…
Cancel
Save