diff options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index fde5f4b..a68ec5a 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |||
@@ -221,15 +221,17 @@ namespace OpenSim.Services.Connectors | |||
221 | if (!CheckReturn(ret)) | 221 | if (!CheckReturn(ret)) |
222 | return null; | 222 | return null; |
223 | 223 | ||
224 | Dictionary<string,object> folders = | 224 | Dictionary<string,object> folders = ret.ContainsKey("FOLDERS") ? |
225 | (Dictionary<string,object>)ret["FOLDERS"]; | 225 | (Dictionary<string,object>)ret["FOLDERS"] : null; |
226 | Dictionary<string,object> items = | 226 | Dictionary<string,object> items = ret.ContainsKey("ITEMS") ? |
227 | (Dictionary<string,object>)ret["ITEMS"]; | 227 | (Dictionary<string, object>)ret["ITEMS"] : null; |
228 | 228 | ||
229 | foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i | 229 | if (folders != null) |
230 | inventory.Folders.Add(BuildFolder((Dictionary<string, object>)o)); | 230 | foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i |
231 | foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i | 231 | inventory.Folders.Add(BuildFolder((Dictionary<string, object>)o)); |
232 | inventory.Items.Add(BuildItem((Dictionary<string, object>)o)); | 232 | if (items != null) |
233 | foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i | ||
234 | inventory.Items.Add(BuildItem((Dictionary<string, object>)o)); | ||
233 | } | 235 | } |
234 | catch (Exception e) | 236 | catch (Exception e) |
235 | { | 237 | { |