If HGSuitcaseInventoryService.GetRootFolder() fails to create a suitcase folder when required, then don't try to store the null and perform other operations on it.

Patch from http://opensimulator.org/mantis/view.php?id=6844
Thanks Kira.
link-sitting
Justin Clark-Casey (justincc) 2013-11-15 23:10:59 +00:00
parent 0595974a89
commit 346644016c
1 changed files with 13 additions and 6 deletions

View File

@ -213,17 +213,24 @@ namespace OpenSim.Services.HypergridService
// In the DB we tag it as type 100, but we use -1 (Unknown) outside // In the DB we tag it as type 100, but we use -1 (Unknown) outside
suitcase = CreateFolder(principalID, root.folderID, 100, "My Suitcase"); suitcase = CreateFolder(principalID, root.folderID, 100, "My Suitcase");
if (suitcase == null) if (suitcase == null)
{
m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder"); m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder");
}
else
{
m_Database.StoreFolder(suitcase); m_Database.StoreFolder(suitcase);
// Create System folders // Create System folders
CreateSystemFolders(principalID, suitcase.folderID); CreateSystemFolders(principalID, suitcase.folderID);
}
SetAsNormalFolder(suitcase); SetAsNormalFolder(suitcase);
return ConvertToOpenSim(suitcase); return ConvertToOpenSim(suitcase);
} }
}
return null;
}
protected void CreateSystemFolders(UUID principalID, UUID rootID) protected void CreateSystemFolders(UUID principalID, UUID rootID)
{ {