1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-14 22:15:41 +00:00

fix: check for value type default

This commit is contained in:
Oliver Booth 2024-10-05 16:31:32 +01:00
parent e71494ef83
commit 9c8f4d64c8
Signed by: oliverbooth
GPG Key ID: 2A862C3F46178E8E

View File

@ -23,7 +23,7 @@ internal static class WorldSettingsConverter
object? propertyValue = property.GetValue(settings); object? propertyValue = property.GetValue(settings);
Type propertyType = property.PropertyType; Type propertyType = property.PropertyType;
if (propertyValue is null) if (propertyValue is null || (propertyType.IsValueType && propertyValue == Activator.CreateInstance(propertyType)))
{ {
continue; continue;
} }