Thanks cmickeyb for a patch that checks for null assets in Cenome asset cache - Mantis #3819

0.6.6-post-fixes
Dahlia Trimble 2009-06-19 17:08:23 +00:00
parent dfd4e78fc0
commit 19b52d13e2
1 changed files with 7 additions and 3 deletions

View File

@ -211,9 +211,13 @@ namespace OpenSim.Region.CoreModules.Asset
/// </param> /// </param>
public void Cache(AssetBase asset) public void Cache(AssetBase asset)
{ {
long size = asset.Data != null ? asset.Data.Length : 1; if (asset != null)
m_cache.Set(asset.ID, asset, size); {
m_cachedCount++; long size = asset.Data != null ? asset.Data.Length : 1;
m_cache.Set(asset.ID, asset, size);
m_cachedCount++;
}
} }
/// <summary> /// <summary>