Added a guard to prevent AnalyzeFilter from crashing if it is called with a null input
This commit is contained in:
@@ -382,12 +382,13 @@ namespace Duplicati.Library.Utility
|
||||
Tuple<bool, bool> cacheLookup;
|
||||
|
||||
// Check for cached results
|
||||
lock(_matchLock)
|
||||
if (_matchFallbackLookup.TryGetValue(filter, out cacheLookup))
|
||||
{
|
||||
includes = cacheLookup.Item1;
|
||||
excludes = cacheLookup.Item2;
|
||||
}
|
||||
if (filter != null)
|
||||
lock(_matchLock)
|
||||
if (_matchFallbackLookup.TryGetValue(filter, out cacheLookup))
|
||||
{
|
||||
includes = cacheLookup.Item1;
|
||||
excludes = cacheLookup.Item2;
|
||||
}
|
||||
|
||||
// Figure out what components are in the filter
|
||||
if (cacheLookup == null)
|
||||
|
||||
Reference in New Issue
Block a user