mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
Fix a possible resource leak in ColorizationColorAffectsBorders
(cherry picked from commit0c911b6ffe) (cherry picked from commitffbaf5e1d1)
This commit is contained in:
@@ -499,7 +499,7 @@ BOOL ColorizationColorAffectsBorders() {
|
||||
DWORD bufSize(sizeof(DWORD));
|
||||
HKEY hKey = NULL;
|
||||
if (::RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\DWM"), 0, KEY_READ, &hKey) != ERROR_SUCCESS) return TRUE;
|
||||
if (::RegQueryValueEx(hKey, _T("ColorPrevalence"), NULL, NULL, reinterpret_cast<LPBYTE>(&result), &bufSize) != ERROR_SUCCESS) return TRUE;
|
||||
if (::RegQueryValueEx(hKey, _T("ColorPrevalence"), NULL, NULL, reinterpret_cast<LPBYTE>(&result), &bufSize) != ERROR_SUCCESS) result = 1;
|
||||
RegCloseKey(hKey);
|
||||
return result == 0 ? FALSE : TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user