Fix improper parsing; add null check
This commit is contained in:
parent
d8cb46113a
commit
7ce2788594
1 changed files with 3 additions and 2 deletions
|
@ -46,13 +46,14 @@ namespace Kerobot.Common
|
||||||
valueSrc = config[whitelistKey];
|
valueSrc = config[whitelistKey];
|
||||||
Mode = FilterMode.Whitelist;
|
Mode = FilterMode.Whitelist;
|
||||||
}
|
}
|
||||||
else if (valueSrc != null && blacklistKey != null)
|
if (valueSrc != null && blacklistKey != null)
|
||||||
{
|
{
|
||||||
// Try getting a blacklist
|
// Try getting a blacklist
|
||||||
valueSrc = config[blacklistKey];
|
valueSrc = config[blacklistKey];
|
||||||
Mode = FilterMode.Blacklist;
|
Mode = FilterMode.Blacklist;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (valueSrc == null)
|
||||||
{
|
{
|
||||||
// Got neither. Have an empty list.
|
// Got neither. Have an empty list.
|
||||||
Mode = FilterMode.None;
|
Mode = FilterMode.None;
|
||||||
|
|
Loading…
Reference in a new issue