aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDahlia Trimble2009-06-19 17:08:23 +0000
committerDahlia Trimble2009-06-19 17:08:23 +0000
commit19b52d13e229b99426ab294a7752b28b8c5ae688 (patch)
treea437b5f851162dc8b0dfbef72b1a3319f9f2fa96 /OpenSim/Region
parentFrom: Rob Smart <SMARTROB@uk.ibm.com> (diff)
downloadopensim-SC_OLD-19b52d13e229b99426ab294a7752b28b8c5ae688.zip
opensim-SC_OLD-19b52d13e229b99426ab294a7752b28b8c5ae688.tar.gz
opensim-SC_OLD-19b52d13e229b99426ab294a7752b28b8c5ae688.tar.bz2
opensim-SC_OLD-19b52d13e229b99426ab294a7752b28b8c5ae688.tar.xz
Thanks cmickeyb for a patch that checks for null assets in Cenome asset cache - Mantis #3819
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>