[Settings]Fix crash opening system color settings (#27797)

* [Settings]Fix crash opening system color settings

* Update src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs

Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>

---------

Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
This commit is contained in:
Jaime Bernardo
2023-08-06 16:48:06 +01:00
committed by GitHub
parent 287fce236d
commit 274bcce4a2

View File

@@ -116,7 +116,14 @@ namespace Microsoft.PowerToys.Settings.UI.Views
private void OpenColorsSettings_Click(object sender, RoutedEventArgs e)
{
Helpers.StartProcessHelper.Start(Helpers.StartProcessHelper.ColorsSettings);
try
{
Helpers.StartProcessHelper.Start(Helpers.StartProcessHelper.ColorsSettings);
}
catch (Exception ex)
{
Logger.LogError("Error while trying to open the system color settings", ex);
}
}
private void RefreshBackupRestoreStatus(int delayMs = 0)