Thanks cmickeyb for a patch that checks for null assets in Cenome asset cache - Mantis #3819
parent
dfd4e78fc0
commit
19b52d13e2
|
@ -210,12 +210,16 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
/// The asset that is being cached.
|
/// The asset that is being cached.
|
||||||
/// </param>
|
/// </param>
|
||||||
public void Cache(AssetBase asset)
|
public void Cache(AssetBase asset)
|
||||||
|
{
|
||||||
|
if (asset != null)
|
||||||
{
|
{
|
||||||
long size = asset.Data != null ? asset.Data.Length : 1;
|
long size = asset.Data != null ? asset.Data.Length : 1;
|
||||||
m_cache.Set(asset.ID, asset, size);
|
m_cache.Set(asset.ID, asset, size);
|
||||||
m_cachedCount++;
|
m_cachedCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clear asset cache.
|
/// Clear asset cache.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue