Added a guard to prevent AnalyzeFilter from crashing if it is called with a null input

This commit is contained in:
Kenneth Skovhede
2016-10-14 00:50:06 +02:00
parent 6d01c81c3f
commit ab1336055d
@@ -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)