diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Main.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Main.cs index 3925490c03..d7a2dda123 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Main.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Main.cs @@ -67,7 +67,7 @@ namespace Microsoft.Plugin.Indexer // To save the configurations of plugins public void Save() { - _storage.Save(); + _storage?.Save(); } // This function uses the Windows indexer and returns the list of results obtained diff --git a/src/modules/launcher/PowerLauncher/App.xaml.cs b/src/modules/launcher/PowerLauncher/App.xaml.cs index 16216ad786..33e5f0e441 100644 --- a/src/modules/launcher/PowerLauncher/App.xaml.cs +++ b/src/modules/launcher/PowerLauncher/App.xaml.cs @@ -170,9 +170,23 @@ namespace PowerLauncher private void RegisterExitEvents() { - AppDomain.CurrentDomain.ProcessExit += (s, e) => Dispose(); - Current.Exit += (s, e) => Dispose(); - Current.SessionEnding += (s, e) => Dispose(); + AppDomain.CurrentDomain.ProcessExit += (s, e) => + { + Log.Info("AppDomain.CurrentDomain.ProcessExit", GetType()); + Dispose(); + }; + + Current.Exit += (s, e) => + { + Log.Info("Application.Current.Exit", GetType()); + Dispose(); + }; + + Current.SessionEnding += (s, e) => + { + Log.Info("Application.Current.SessionEnding", GetType()); + Dispose(); + }; } /// diff --git a/src/modules/launcher/Wox.Plugin/PluginPair.cs b/src/modules/launcher/Wox.Plugin/PluginPair.cs index 55a06ac9bf..7586bdead8 100644 --- a/src/modules/launcher/Wox.Plugin/PluginPair.cs +++ b/src/modules/launcher/Wox.Plugin/PluginPair.cs @@ -114,6 +114,7 @@ namespace Wox.Plugin private void LoadPlugin() { var stopWatch = new Stopwatch(); + stopWatch.Start(); CreatePluginInstance(); stopWatch.Stop(); Metadata.InitTime += stopWatch.ElapsedMilliseconds;