mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Fix settings crash issue when clicking "Open Cmdpal settings..." (#39322)
Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
This commit is contained in:
@@ -50,12 +50,15 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
CreateNoWindow = false,
|
||||
};
|
||||
|
||||
Process process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start the process.");
|
||||
process.WaitForInputIdle();
|
||||
Process process = Process.Start(processStartInfo);
|
||||
if (process == null)
|
||||
{
|
||||
Logger.LogError($"Failed to launch CmdPal settings page.");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidOperationException($"Failed to launch CmdPal settings: {ex.Message}");
|
||||
Logger.LogError($"Failed to launch CmdPal settings: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user