mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Fix crash on querying when plugins are initializing
This commit is contained in:
@@ -10,16 +10,9 @@ namespace Wox.Commands
|
||||
{
|
||||
public class SystemCommand : BaseCommand
|
||||
{
|
||||
private List<PluginPair> systemPlugins;
|
||||
|
||||
public SystemCommand()
|
||||
{
|
||||
systemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System).ToList();
|
||||
}
|
||||
|
||||
public override void Dispatch(Query query)
|
||||
{
|
||||
foreach (PluginPair pair in systemPlugins)
|
||||
foreach (PluginPair pair in Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System))
|
||||
{
|
||||
PluginPair pair1 = pair;
|
||||
ThreadPool.QueueUserWorkItem(state =>
|
||||
|
||||
Reference in New Issue
Block a user