mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-01 15:05:12 +00:00
[Settings]Fix crash caused by dangling thread (#35603)
* Fix crash caused by dangling thread * Fix process access to be able to WaitForSingleObject it
This commit is contained in:
@@ -625,7 +625,7 @@ void close_settings_window()
|
||||
if (g_settings_process_id != 0)
|
||||
{
|
||||
SetEvent(g_terminateSettingsEvent);
|
||||
wil::unique_handle proc{ OpenProcess(PROCESS_TERMINATE, false, g_settings_process_id) };
|
||||
wil::unique_handle proc{ OpenProcess(PROCESS_ALL_ACCESS, false, g_settings_process_id) };
|
||||
if (proc)
|
||||
{
|
||||
WaitForSingleObject(proc.get(), 1500);
|
||||
|
Reference in New Issue
Block a user