aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-14 20:04:48 +0000
committerTeravus Ovares2008-06-14 20:04:48 +0000
commit7ca868dca5ced00441d05a31cae83604e1b196ff (patch)
tree73431b47bf89b64c1277764178fd9b38c0921ff3 /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Start recording asset request failures (diff)
downloadopensim-SC_OLD-7ca868dca5ced00441d05a31cae83604e1b196ff.zip
opensim-SC_OLD-7ca868dca5ced00441d05a31cae83604e1b196ff.tar.gz
opensim-SC_OLD-7ca868dca5ced00441d05a31cae83604e1b196ff.tar.bz2
opensim-SC_OLD-7ca868dca5ced00441d05a31cae83604e1b196ff.tar.xz
* Fixes: 0001554: r5106 update fails to load on some regions with NullRef error on volume portion of maptile drawing routine.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index a7535e1..b6d8d0e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1160,6 +1160,9 @@ namespace OpenSim.Region.Environment.Scenes
1160 // Loop over prim in group 1160 // Loop over prim in group
1161 foreach (SceneObjectPart part in mapdot.Children.Values) 1161 foreach (SceneObjectPart part in mapdot.Children.Values)
1162 { 1162 {
1163 if (part == null)
1164 continue;
1165
1163 // Draw if the object is at least 1 meter wide in any direction 1166 // Draw if the object is at least 1 meter wide in any direction
1164 if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f) 1167 if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f)
1165 { 1168 {
@@ -1168,6 +1171,23 @@ namespace OpenSim.Region.Environment.Scenes
1168 try 1171 try
1169 { 1172 {
1170 LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; 1173 LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA;
1174
1175 // Not sure why some of these are null, oh well.
1176
1177 if (part == null)
1178 continue;
1179
1180 if (part.Shape == null)
1181 continue;
1182
1183 if (part.Shape.Textures == null)
1184 continue;
1185
1186 if (part.Shape.Textures.DefaultTexture == null)
1187 continue;
1188
1189
1190
1171 int colorr = 255 - (int)(texcolor.R * 255f); 1191 int colorr = 255 - (int)(texcolor.R * 255f);
1172 int colorg = 255 - (int)(texcolor.G * 255f); 1192 int colorg = 255 - (int)(texcolor.G * 255f);
1173 int colorb = 255 - (int)(texcolor.B * 255f); 1193 int colorb = 255 - (int)(texcolor.B * 255f);