diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index 6423f28..7bd1273 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | |||
@@ -225,10 +225,13 @@ namespace OpenSim.Framework.Data.MySQL | |||
225 | MySqlDataReader reader = result.ExecuteReader(); | 225 | MySqlDataReader reader = result.ExecuteReader(); |
226 | 226 | ||
227 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); | 227 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); |
228 | while(reader.Read()) | 228 | while (reader.Read()) |
229 | items.Add(readInventoryFolder(reader)); | 229 | items.Add(readInventoryFolder(reader)); |
230 | 230 | ||
231 | InventoryFolderBase rootFolder = items[0]; //should only be one folder with parent set to zero (the root one). | 231 | InventoryFolderBase rootFolder = null; |
232 | if (items.Count > 0) | ||
233 | rootFolder = items[0]; //should only be one folder with parent set to zero (the root one). | ||
234 | |||
232 | reader.Close(); | 235 | reader.Close(); |
233 | result.Dispose(); | 236 | result.Dispose(); |
234 | 237 | ||