From 346644016c529db6ed63aa866c7cf91cec1b635f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Nov 2013 23:10:59 +0000 Subject: 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. --- .../HypergridService/HGSuitcaseInventoryService.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs') diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 0601ece..835cde3 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs @@ -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); + SetAsNormalFolder(suitcase); - return ConvertToOpenSim(suitcase); + return ConvertToOpenSim(suitcase); + } + } + + return null; } protected void CreateSystemFolders(UUID principalID, UUID rootID) -- cgit v1.1