diff --git a/Wox.Infrastructure/FuzzyMatcher.cs b/Wox.Infrastructure/FuzzyMatcher.cs index 5b0e144c8d..0da5c89a5e 100644 --- a/Wox.Infrastructure/FuzzyMatcher.cs +++ b/Wox.Infrastructure/FuzzyMatcher.cs @@ -32,6 +32,8 @@ namespace Wox.Infrastructure public MatchResult Evaluate(string str) { + if (string.IsNullOrEmpty(str) || string.IsNullOrEmpty(query)) return new MatchResult() { Success = false }; + var len = str.Length; var compareString = opt.IgnoreCase ? str.ToLower() : str; var pattern = opt.IgnoreCase ? query.ToLower() : query;