Added check so Util.ReadSettingsFromIniFile doesn't try to set static fields.
parent
aa5b4b6437
commit
da2cbb75b6
|
@ -939,6 +939,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
FieldInfo[] fieldInfos = settingsType.GetFields();
|
FieldInfo[] fieldInfos = settingsType.GetFields();
|
||||||
foreach (FieldInfo fieldInfo in fieldInfos)
|
foreach (FieldInfo fieldInfo in fieldInfos)
|
||||||
|
{
|
||||||
|
if (!fieldInfo.IsStatic)
|
||||||
{
|
{
|
||||||
if (fieldInfo.FieldType == typeof(System.String))
|
if (fieldInfo.FieldType == typeof(System.String))
|
||||||
{
|
{
|
||||||
|
@ -961,6 +963,7 @@ namespace OpenSim.Framework
|
||||||
fieldInfo.SetValue(settingsClass, System.Convert.ToUInt32(config.Get(fieldInfo.Name, ((uint)fieldInfo.GetValue(settingsClass)).ToString())));
|
fieldInfo.SetValue(settingsClass, System.Convert.ToUInt32(config.Get(fieldInfo.Name, ((uint)fieldInfo.GetValue(settingsClass)).ToString())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PropertyInfo[] propertyInfos = settingsType.GetProperties();
|
PropertyInfo[] propertyInfos = settingsType.GetProperties();
|
||||||
foreach (PropertyInfo propInfo in propertyInfos)
|
foreach (PropertyInfo propInfo in propertyInfos)
|
||||||
|
|
Loading…
Reference in New Issue