diff options
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 22 |
1 files changed, 14 insertions, 8 deletions
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 | |||
104 | 104 | ||
105 | foreach (TextureImage texture in Textures.Values) | 105 | foreach (TextureImage texture in Textures.Values) |
106 | { | 106 | { |
107 | if (texture.Temporary) | 107 | if (texture != null) |
108 | { | 108 | { |
109 | temporaryImages++; | 109 | if (texture.Temporary) |
110 | } | 110 | { |
111 | temporaryImages++; | ||
112 | } | ||
111 | 113 | ||
112 | imageBytes += texture.Data.GetLongLength(0); | 114 | imageBytes += texture.Data.GetLongLength(0); |
115 | } | ||
113 | } | 116 | } |
114 | 117 | ||
115 | foreach (AssetInfo asset in Assets.Values) | 118 | foreach (AssetInfo asset in Assets.Values) |
116 | { | 119 | { |
117 | if (asset.Temporary) | 120 | if (asset != null) |
118 | { | 121 | { |
119 | temporaryAssets++; | 122 | if (asset.Temporary) |
120 | } | 123 | { |
124 | temporaryAssets++; | ||
125 | } | ||
121 | 126 | ||
122 | assetBytes += asset.Data.GetLongLength(0); | 127 | assetBytes += asset.Data.GetLongLength(0); |
128 | } | ||
123 | } | 129 | } |
124 | 130 | ||
125 | m_log.InfoFormat("Temporary Images: {0} Temporary Assets: {1}", | 131 | m_log.InfoFormat("Temporary Images: {0} Temporary Assets: {1}", |