From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001
From: David Walter Seikel
Date: Thu, 3 Nov 2016 21:44:39 +1000
Subject: Initial update to OpenSim 0.8.2.1 source code.

---
 OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

(limited to 'OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs')

diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
index e40caec..ebec9d2 100644
--- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
@@ -194,6 +194,14 @@ namespace OpenSim.Region.CoreModules.Asset
 
         #region IImprovedAssetCache Members
 
+        public bool Check(string id)
+        {
+            AssetBase asset;
+
+            // XXX:This is probably not an efficient implementation.
+            return m_cache.TryGetValue(id, out asset);
+        }
+
         /// <summary>
         /// Cache asset.
         /// </summary>
@@ -308,9 +316,12 @@ namespace OpenSim.Region.CoreModules.Asset
         /// </summary>
         public void Close()
         {
-            m_enabled = false;
-            m_cache.Clear();
-            m_cache = null;
+            if (m_enabled)
+            {
+                m_enabled = false;
+                m_cache.Clear();
+                m_cache = null;
+            }
         }
 
         /// <summary>
-- 
cgit v1.1