Fuxed possible null reference.
This commit is contained in:
parent
c45e6d526c
commit
bb46021f20
@ -22,6 +22,8 @@ namespace FileManager
|
||||
|
||||
public string FindFile(string regexPattern, RegexOptions options)
|
||||
{
|
||||
if (fsCache is null) return null;
|
||||
|
||||
lock (fsCache)
|
||||
{
|
||||
return fsCache.FirstOrDefault(s => Regex.IsMatch(s, regexPattern, options));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user