From c62328950a3e4ad30dbe972db11d05ca7519d6de Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Mon, 18 Feb 2008 14:21:51 +0000 Subject: More exception checks and crash hints If no scriptengine is specified then don't try to load any. --- OpenSim/Framework/Statistics/SimExtraStatsReporter.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Statistics/SimExtraStatsReporter.cs') diff --git a/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs b/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs index 73f36f9..c8b8223 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsReporter.cs @@ -50,8 +50,12 @@ namespace OpenSim.Framework.Statistics public void AddTexture(AssetBase image) { - texturesInCache++; - textureCacheMemoryUsage += image.Data.Length; + // Tedd: I added null check to avoid exception. Don't know if texturesInCache should ++ anyway? + if (image.Data != null) + { + texturesInCache++; + textureCacheMemoryUsage += image.Data.Length; + } } /// -- cgit v1.1