now that creatorID is no longer a strict UUID, and the column can still be NULL,

we lost protection from NULL strings.  This puts some protection in for that case.
This may address many of the inventory issues that are being seen intermitently.
0.6.5-rc1
Sean Dague 2009-05-08 12:28:22 +00:00
parent 8ac73be917
commit 3485b2b1c3
1 changed files with 10 additions and 1 deletions

View File

@ -306,7 +306,16 @@ namespace OpenSim.Data.MySQL
try try
{ {
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
// TODO: this is to handle a case where NULLs creep in there, which we are not sure is indemic to the system, or legacy. It would be nice to live fix these.
if (reader["creatorID"] == null)
{
item.CreatorId = UUID.Zero.ToString();
}
else
{
item.CreatorId = (string)reader["creatorID"]; item.CreatorId = (string)reader["creatorID"];
}
// Be a bit safer in parsing these because the // Be a bit safer in parsing these because the
// database doesn't enforce them to be not null, and // database doesn't enforce them to be not null, and