diff options
author | Sean Dague | 2009-05-08 12:28:22 +0000 |
---|---|---|
committer | Sean Dague | 2009-05-08 12:28:22 +0000 |
commit | 3485b2b1c3d7acf56ce3d7d1d3498c2d19567038 (patch) | |
tree | 591a9d159095478b0d217c9eff80407496432f51 /OpenSim | |
parent | * Introduced new HttpServer.Tests project (diff) | |
download | opensim-SC_OLD-3485b2b1c3d7acf56ce3d7d1d3498c2d19567038.zip opensim-SC_OLD-3485b2b1c3d7acf56ce3d7d1d3498c2d19567038.tar.gz opensim-SC_OLD-3485b2b1c3d7acf56ce3d7d1d3498c2d19567038.tar.bz2 opensim-SC_OLD-3485b2b1c3d7acf56ce3d7d1d3498c2d19567038.tar.xz |
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.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 7092096..66e13a9 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -306,7 +306,16 @@ namespace OpenSim.Data.MySQL | |||
306 | try | 306 | try |
307 | { | 307 | { |
308 | InventoryItemBase item = new InventoryItemBase(); | 308 | InventoryItemBase item = new InventoryItemBase(); |
309 | item.CreatorId = (string)reader["creatorID"]; | 309 | |
310 | // 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. | ||
311 | if (reader["creatorID"] == null) | ||
312 | { | ||
313 | item.CreatorId = UUID.Zero.ToString(); | ||
314 | } | ||
315 | else | ||
316 | { | ||
317 | item.CreatorId = (string)reader["creatorID"]; | ||
318 | } | ||
310 | 319 | ||
311 | // Be a bit safer in parsing these because the | 320 | // Be a bit safer in parsing these because the |
312 | // database doesn't enforce them to be not null, and | 321 | // database doesn't enforce them to be not null, and |