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,6 +187,10 @@ namespace OpenSim.Data.MySQL
|
|||
if (s == "locY")
|
||||
continue;
|
||||
|
||||
object value = result[s];
|
||||
if (value is DBNull)
|
||||
ret.Data[s] = null;
|
||||
else
|
||||
ret.Data[s] = result[s].ToString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue