When reading a region, use null objects to represent NULL fields.
Previously NULL fields were converted to an empty string due to the use of ToString(). But if the field was an Int (e.g., "locZ"), then the subsequent attempt to convert an empty string to an int caused an exception. Now the field is null so we don't try to convert it, so there's no exception.0.7.4.1
parent
6011bfa5e3
commit
c70e85a327
|
@ -187,7 +187,11 @@ namespace OpenSim.Data.MySQL
|
||||||
if (s == "locY")
|
if (s == "locY")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret.Data[s] = result[s].ToString();
|
object value = result[s];
|
||||||
|
if (value is DBNull)
|
||||||
|
ret.Data[s] = null;
|
||||||
|
else
|
||||||
|
ret.Data[s] = result[s].ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
retList.Add(ret);
|
retList.Add(ret);
|
||||||
|
|
Loading…
Reference in New Issue