mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 20:57:22 +02:00
[PT Settings] Crash on restart with OOBE window opened fix (#10005)
This commit is contained in:
@@ -73,6 +73,7 @@ namespace PowerToys.Settings
|
|||||||
ShellPage.SetRestartAdminSndMessageCallback(msg =>
|
ShellPage.SetRestartAdminSndMessageCallback(msg =>
|
||||||
{
|
{
|
||||||
Program.GetTwoWayIPCManager().Send(msg);
|
Program.GetTwoWayIPCManager().Send(msg);
|
||||||
|
isOpen = false;
|
||||||
System.Windows.Application.Current.Shutdown(); // close application
|
System.Windows.Application.Current.Shutdown(); // close application
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -117,7 +118,13 @@ namespace PowerToys.Settings
|
|||||||
// XAML Islands: If the window is open, explicitly force it to be shown to solve the blank dialog issue https://github.com/microsoft/PowerToys/issues/3384
|
// XAML Islands: If the window is open, explicitly force it to be shown to solve the blank dialog issue https://github.com/microsoft/PowerToys/issues/3384
|
||||||
if (isOpen)
|
if (isOpen)
|
||||||
{
|
{
|
||||||
Show();
|
try
|
||||||
|
{
|
||||||
|
Show();
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user