Add null check
This commit is contained in:
parent
1fbc9bca7f
commit
ee94cfd961
1 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,8 @@ namespace Kerobot.Common
|
|||
}
|
||||
|
||||
// Verify that the specified array is actually an array.
|
||||
if (valueSrc.Type != JTokenType.Array) throw new ArgumentException("Given list must be a JSON array.");
|
||||
if (valueSrc != null && valueSrc.Type != JTokenType.Array)
|
||||
throw new ArgumentException("Given list must be a JSON array.");
|
||||
FilteredList = new EntityList((JArray)valueSrc, true);
|
||||
|
||||
// Verify the same for the exemption list.
|
||||
|
|
Loading…
Reference in a new issue