fixes possible null-ref

This commit is contained in:
benbierens 2023-10-08 07:46:48 +02:00
parent 4f764ac4c7
commit e2a6a2f792
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }