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];
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue