diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index 26167e945..700a7d509 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -183,6 +183,8 @@ namespace Flow.Launcher.Core.Plugin throw new ArgumentOutOfRangeException(); } token.ThrowIfCancellationRequested(); + if (results == null) + return results; UpdatePluginMetadata(results, metadata, query); metadata.QueryCount += 1; diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 05dbb3a8b..afbe6e197 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -363,7 +363,7 @@ namespace Flow.Launcher.ViewModel } if (!match.IsSearchPrecisionScoreMet()) return false; - + r.Score = match.Score; return true; @@ -512,7 +512,7 @@ namespace Flow.Launcher.ViewModel await Task.Yield(); var results = await PluginManager.QueryForPlugin(plugin, query, currentCancellationToken); - if (!currentCancellationToken.IsCancellationRequested) + if (!currentCancellationToken.IsCancellationRequested && results != null) _resultsUpdateQueue.Post(new ResultsForUpdate(results, plugin.Metadata, query, currentCancellationToken)); }