Fix improper parsing; add null check

This commit is contained in:
Noikoio 2018-09-21 20:39:36 -07:00
parent d8cb46113a
commit 7ce2788594

View file

@ -46,13 +46,14 @@ namespace Kerobot.Common
valueSrc = config[whitelistKey];
Mode = FilterMode.Whitelist;
}
else if (valueSrc != null && blacklistKey != null)
if (valueSrc != null && blacklistKey != null)
{
// Try getting a blacklist
valueSrc = config[blacklistKey];
Mode = FilterMode.Blacklist;
}
else
if (valueSrc == null)
{
// Got neither. Have an empty list.
Mode = FilterMode.None;