* Fix problem where inventory code throws a swallowed exception on grid mode if the avatar has never logged in before

0.6.0-stable
Justin Clarke Casey 2008-03-31 17:08:58 +00:00
parent 5f04cebb25
commit af3118eccd
2 changed files with 34 additions and 18 deletions

View File

@ -79,11 +79,20 @@ namespace OpenSim.Framework.Communications
// See IInventoryServices // See IInventoryServices
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
{ {
//m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); try
{
m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>(); List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
InventoryFolderBase rootFolder = RequestRootFolder(userId); InventoryFolderBase rootFolder = RequestRootFolder(userId);
// Agent is completely new and has no inventory structure yet.
if (null == rootFolder)
{
return null;
}
userFolders.Add(rootFolder); userFolders.Add(rootFolder);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
@ -99,6 +108,13 @@ namespace OpenSim.Framework.Communications
return userFolders; return userFolders;
} }
catch (Exception e)
{
m_log.ErrorFormat("GetInventorySkeleton() exception {0}", e);
}
return null;
}
// See IInventoryServices // See IInventoryServices
public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder) public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder)

View File

@ -1201,7 +1201,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
/// <summary> /// <summary>
/// /// Duplicate the given object.
/// </summary> /// </summary>
/// <param name="originalPrim"></param> /// <param name="originalPrim"></param>
/// <param name="offset"></param> /// <param name="offset"></param>