From 61bba6375c91ba246e5139c1f449d03169ce31ce Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 22 May 2008 00:49:17 +0000 Subject: * Fix mantis 1325. This is a minor issue where 'show assets' would not work fully in the region console --- .../Framework/Communications/Cache/AssetCache.cs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 796be5b..3ae18f1 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -104,22 +104,28 @@ namespace OpenSim.Framework.Communications.Cache foreach (TextureImage texture in Textures.Values) { - if (texture.Temporary) + if (texture != null) { - temporaryImages++; - } + if (texture.Temporary) + { + temporaryImages++; + } - imageBytes += texture.Data.GetLongLength(0); + imageBytes += texture.Data.GetLongLength(0); + } } foreach (AssetInfo asset in Assets.Values) { - if (asset.Temporary) + if (asset != null) { - temporaryAssets++; - } + if (asset.Temporary) + { + temporaryAssets++; + } - assetBytes += asset.Data.GetLongLength(0); + assetBytes += asset.Data.GetLongLength(0); + } } m_log.InfoFormat("Temporary Images: {0} Temporary Assets: {1}", -- cgit v1.1