aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
index d42c9e2..0d73296 100644
--- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
@@ -211,9 +211,13 @@ namespace OpenSim.Region.CoreModules.Asset
211 /// </param> 211 /// </param>
212 public void Cache(AssetBase asset) 212 public void Cache(AssetBase asset)
213 { 213 {
214 long size = asset.Data != null ? asset.Data.Length : 1; 214 if (asset != null)
215 m_cache.Set(asset.ID, asset, size); 215 {
216 m_cachedCount++; 216 long size = asset.Data != null ? asset.Data.Length : 1;
217 m_cache.Set(asset.ID, asset, size);
218 m_cachedCount++;
219 }
220
217 } 221 }
218 222
219 /// <summary> 223 /// <summary>