mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +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,
|
CreateNoWindow = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
Process process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start the process.");
|
Process process = Process.Start(processStartInfo);
|
||||||
process.WaitForInputIdle();
|
if (process == null)
|
||||||
|
{
|
||||||
|
Logger.LogError($"Failed to launch CmdPal settings page.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
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