From a98be21181059402c1759f689b6099c16f4d3552 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 11 Aug 2017 22:53:31 +0200 Subject: [PATCH] small error fix --- src/NadekoBot/Modules/Searches/Services/SearchesService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Services/SearchesService.cs b/src/NadekoBot/Modules/Searches/Services/SearchesService.cs index 396937a9..368c5618 100644 --- a/src/NadekoBot/Modules/Searches/Services/SearchesService.cs +++ b/src/NadekoBot/Modules/Searches/Services/SearchesService.cs @@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Searches.Services public List WowJokes { get; } = new List(); public List MagicItems { get; } = new List(); - private readonly ConcurrentDictionary _imageCacher = new ConcurrentDictionary(); + private readonly ConcurrentDictionary _imageCacher = new ConcurrentDictionary(); private readonly ConcurrentDictionary> _blacklistedTags = new ConcurrentDictionary>(); @@ -133,7 +133,7 @@ namespace NadekoBot.Modules.Searches.Services { throw new TagBlacklistedException(); } - var cacher = _imageCacher.GetOrAdd(guild, (key) => new SearchImageCacher()); + var cacher = _imageCacher.GetOrAdd(guild ?? 0, (key) => new SearchImageCacher()); return cacher.GetImage(tag, isExplicit, type); }