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