Browse Source

Fixing RegCloseKey invalid handle

pull/51/head
justanotheranonymoususer 4 years ago
parent
commit
3012ced8ff
  1. 4
      ExplorerPatcher/GUI.c

4
ExplorerPatcher/GUI.c

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

Loading…
Cancel
Save