Skip to content

Commit f13dc31

Browse files
committed
Fix crashes when resetting configs whenever the "DefaultValue" type did not match the target property.
1 parent befdcfe commit f13dc31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/Reloaded.Mod.Launcher/Controls/PropertyGridEx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void ResetValues()
6262
{
6363
var property = _properties[x];
6464
if (property.DefaultValue != null)
65-
_propertyDescriptors[x].SetValue(property.Value, property.DefaultValue);
65+
_propertyDescriptors[x].SetValue(property.Value, Convert.ChangeType(property.DefaultValue, property.PropertyType));
6666
}
6767
}
6868
}

0 commit comments

Comments
 (0)