diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs
index 73ffc5e915..3c3534f5dc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs
@@ -145,6 +145,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
m_InventoryCache.Remove(userID);
}
+ ///
+ /// Get the system folder for a particular asset type
+ ///
+ ///
+ ///
+ ///
public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
{
Dictionary folders = null;
@@ -152,6 +158,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
lock (m_InventoryCache)
{
m_InventoryCache.TryGetValue(userID, out folders);
+
+ // In some situations (such as non-secured standalones), system folders can be requested without
+ // the user being logged in. So we need to try caching them here if we don't already have them.
+ if (null == folders)
+ CacheSystemFolders(userID);
+
+ m_InventoryCache.TryGetValue(userID, out folders);
}
if ((folders != null) && folders.ContainsKey(type))