fixes possible null-ref
This commit is contained in:
parent
4f764ac4c7
commit
e2a6a2f792
|
@ -234,7 +234,7 @@ namespace ArgsUniform
|
||||||
private static bool AssignBool(T result, PropertyInfo uniformProperty, object value)
|
private static bool AssignBool(T result, PropertyInfo uniformProperty, object value)
|
||||||
{
|
{
|
||||||
var s = value.ToString();
|
var s = value.ToString();
|
||||||
if (s == "1" || s.ToLowerInvariant() == "true")
|
if (s == "1" || (s != null && s.ToLowerInvariant() == "true"))
|
||||||
{
|
{
|
||||||
uniformProperty.SetValue(result, true);
|
uniformProperty.SetValue(result, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue