diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index a0228e826a..3187215211 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -79,25 +79,41 @@ namespace OpenSim.Framework.Communications // See IInventoryServices public List GetInventorySkeleton(LLUUID userId) { - //m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); - - List userFolders = new List(); - - InventoryFolderBase rootFolder = RequestRootFolder(userId); - userFolders.Add(rootFolder); - - foreach (KeyValuePair plugin in m_plugins) + try { - IList folders = plugin.Value.getFolderHierarchy(rootFolder.folderID); - userFolders.AddRange(folders); - } + m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); + + List userFolders = new List(); + + InventoryFolderBase rootFolder = RequestRootFolder(userId); + + // Agent is completely new and has no inventory structure yet. + if (null == rootFolder) + { + return null; + } + + userFolders.Add(rootFolder); + + foreach (KeyValuePair plugin in m_plugins) + { + IList folders = plugin.Value.getFolderHierarchy(rootFolder.folderID); + userFolders.AddRange(folders); + } + + // foreach (InventoryFolderBase folder in userFolders) + // { + // m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); + // } + + return userFolders; + } + catch (Exception e) + { + m_log.ErrorFormat("GetInventorySkeleton() exception {0}", e); + } -// foreach (InventoryFolderBase folder in userFolders) -// { -// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); -// } - - return userFolders; + return null; } // See IInventoryServices diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 1187c37918..fb4f02cfad 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -1201,7 +1201,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// Duplicate the given object. /// /// ///