diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 991e9c7..592ade9 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -343,7 +343,14 @@ namespace OpenSim.Data.MySQL | |||
343 | m_log.WarnFormat("Could not cast salePrice {0} to {1}", reader["salePrice"], "int"); | 343 | m_log.WarnFormat("Could not cast salePrice {0} to {1}", reader["salePrice"], "int"); |
344 | } | 344 | } |
345 | 345 | ||
346 | item.SaleType = Convert.ToByte(reader["saleType"]); | 346 | try |
347 | { | ||
348 | item.SaleType = Convert.ToByte(reader["saleType"]); | ||
349 | } | ||
350 | catch (InvalidCastException) | ||
351 | { | ||
352 | m_log.WarnFormat("Could not convert saleType {0} to {1}", reader["saleType"], "byte"); | ||
353 | } | ||
347 | 354 | ||
348 | try | 355 | try |
349 | { | 356 | { |
@@ -354,8 +361,24 @@ namespace OpenSim.Data.MySQL | |||
354 | m_log.WarnFormat("Could not cast creationDate {0} to {1}", reader["creationDate"], "int"); | 361 | m_log.WarnFormat("Could not cast creationDate {0} to {1}", reader["creationDate"], "int"); |
355 | } | 362 | } |
356 | 363 | ||
357 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | 364 | try |
358 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 365 | { |
366 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | ||
367 | } | ||
368 | catch (Exception) | ||
369 | { | ||
370 | item.GroupID = LLUUID.Zero; | ||
371 | m_log.WarnFormat("Could not convert groupID {0} to {1}", reader["groupID"], "LLUUID"); | ||
372 | } | ||
373 | |||
374 | try | ||
375 | { | ||
376 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | ||
377 | } | ||
378 | catch (InvalidCastException) | ||
379 | { | ||
380 | m_log.WarnFormat("Could not cast groupOwned {0} to {1}", reader["groupOwned"], "boolean"); | ||
381 | } | ||
359 | 382 | ||
360 | try | 383 | try |
361 | { | 384 | { |