From 3485b2b1c3d7acf56ce3d7d1d3498c2d19567038 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 8 May 2009 12:28:22 +0000 Subject: [PATCH] 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. --- OpenSim/Data/MySQL/MySQLInventoryData.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 7092096d44..66e13a9671 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -306,7 +306,16 @@ namespace OpenSim.Data.MySQL try { InventoryItemBase item = new InventoryItemBase(); - item.CreatorId = (string)reader["creatorID"]; + + // 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"]; + } // Be a bit safer in parsing these because the // database doesn't enforce them to be not null, and