Skip to content

Commit

Permalink
Start10: Attempt to fix exploding RAM usage when opening Start10 on 2…
Browse files Browse the repository at this point in the history
…2621.2134+
  • Loading branch information
Amrsatrio committed Oct 21, 2023
1 parent f027a36 commit 67b7a27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ExplorerPatcher/StartMenuSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
std::vector<winrt::guid> places;

DWORD dwSize;
HRESULT hr = RegGetValueW(
LSTATUS lRes = RegGetValueW(
HKEY_CURRENT_USER,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
L"VisiblePlaces",
Expand All @@ -35,11 +35,11 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
nullptr,
&dwSize
);
if (FAILED(hr) || dwSize == 0)
if (lRes != ERROR_SUCCESS || dwSize == 0)
return places;

places.resize(dwSize / sizeof(winrt::guid));
hr = RegGetValueW(
lRes = RegGetValueW(
HKEY_CURRENT_USER,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start",
L"VisiblePlaces",
Expand All @@ -48,7 +48,7 @@ static std::vector<winrt::guid> GlobalStartData_GetPlacesFromRegistry()
places.data(),
&dwSize
);
if (FAILED(hr))
if (lRes != ERROR_SUCCESS)
places.clear();

return places;
Expand Down

0 comments on commit 67b7a27

Please sign in to comment.