From 19b52d13e229b99426ab294a7752b28b8c5ae688 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Fri, 19 Jun 2009 17:08:23 +0000 Subject: [PATCH] Thanks cmickeyb for a patch that checks for null assets in Cenome asset cache - Mantis #3819 --- OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index d42c9e2a5e..0d732960ce 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs @@ -211,9 +211,13 @@ namespace OpenSim.Region.CoreModules.Asset /// public void Cache(AssetBase asset) { - long size = asset.Data != null ? asset.Data.Length : 1; - m_cache.Set(asset.ID, asset, size); - m_cachedCount++; + if (asset != null) + { + long size = asset.Data != null ? asset.Data.Length : 1; + m_cache.Set(asset.ID, asset, size); + m_cachedCount++; + } + } ///