From 7f25e3ba97a55279b3d6e311435efbe48833ebf1 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Tue, 16 Jun 2020 10:53:27 -0700 Subject: [PATCH] Allowing launcher to be run as startup project with no command line args (#4267) --- src/modules/launcher/PowerLauncher/App.xaml.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/launcher/PowerLauncher/App.xaml.cs b/src/modules/launcher/PowerLauncher/App.xaml.cs index 278f394513..a0c6b6c612 100644 --- a/src/modules/launcher/PowerLauncher/App.xaml.cs +++ b/src/modules/launcher/PowerLauncher/App.xaml.cs @@ -39,7 +39,10 @@ namespace PowerLauncher { if (SingleInstance.InitializeAsFirstInstance(Unique)) { - int.TryParse(args[0], out _powerToysPid); + if (args.Length > 0) + { + int.TryParse(args[0], out _powerToysPid); + } using (var application = new App()) {