fix error thrown in checking cache key when key is null

This commit is contained in:
张弘韬 2021-08-08 13:45:18 +08:00
parent a0835288e2
commit 653dc83bd0

View file

@ -84,7 +84,7 @@ namespace Flow.Launcher.Infrastructure.Image
public bool ContainsKey(string key)
{
return Data.ContainsKey(key) && Data[key].imageSource != null;
return key is not null && Data.ContainsKey(key) && Data[key].imageSource != null;
}
public int CacheSize()