aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2015-06-04 16:17:45 -0700
committerDiva Canto2015-06-04 16:17:45 -0700
commit83267e19f634b7957ceb2f9b0e2009fa0f8340a3 (patch)
tree0425f5491bd693732aab90935739148d43c11bd0 /OpenSim
parentMantis #7600. The warning message was not a symptom of a problem, it was just... (diff)
downloadopensim-SC-83267e19f634b7957ceb2f9b0e2009fa0f8340a3.zip
opensim-SC-83267e19f634b7957ceb2f9b0e2009fa0f8340a3.tar.gz
opensim-SC-83267e19f634b7957ceb2f9b0e2009fa0f8340a3.tar.bz2
opensim-SC-83267e19f634b7957ceb2f9b0e2009fa0f8340a3.tar.xz
Mantis #7536. This may alleviate the side effects of broken SceneObjects XML. It doesn't (can't) fix the cause.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs35
1 files changed, 20 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 4961309..b4fcf8f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2222,6 +2222,8 @@ namespace OpenSim.Region.Framework.Scenes
2222 { 2222 {
2223 objlist = new List<SceneObjectGroup>(); 2223 objlist = new List<SceneObjectGroup>();
2224 veclist = new List<Vector3>(); 2224 veclist = new List<Vector3>();
2225 bbox = Vector3.Zero;
2226 offsetHeight = 0;
2225 2227
2226 string xmlData = Utils.BytesToString(assetData); 2228 string xmlData = Utils.BytesToString(assetData);
2227 2229
@@ -2237,9 +2239,12 @@ namespace OpenSim.Region.Framework.Scenes
2237 if (isSingleObject || isAttachment) 2239 if (isSingleObject || isAttachment)
2238 { 2240 {
2239 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader); 2241 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader);
2240 objlist.Add(g); 2242 if (g != null)
2241 veclist.Add(Vector3.Zero); 2243 {
2242 bbox = g.GetAxisAlignedBoundingBox(out offsetHeight); 2244 objlist.Add(g);
2245 veclist.Add(Vector3.Zero);
2246 bbox = g.GetAxisAlignedBoundingBox(out offsetHeight);
2247 }
2243 return true; 2248 return true;
2244 } 2249 }
2245 else 2250 else
@@ -2258,17 +2263,20 @@ namespace OpenSim.Region.Framework.Scenes
2258 foreach (XmlNode n in groups) 2263 foreach (XmlNode n in groups)
2259 { 2264 {
2260 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); 2265 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
2261 objlist.Add(g); 2266 if (g != null)
2267 {
2268 objlist.Add(g);
2262 2269
2263 XmlElement el = (XmlElement)n; 2270 XmlElement el = (XmlElement)n;
2264 string rawX = el.GetAttribute("offsetx"); 2271 string rawX = el.GetAttribute("offsetx");
2265 string rawY = el.GetAttribute("offsety"); 2272 string rawY = el.GetAttribute("offsety");
2266 string rawZ = el.GetAttribute("offsetz"); 2273 string rawZ = el.GetAttribute("offsetz");
2267 2274
2268 float x = Convert.ToSingle(rawX); 2275 float x = Convert.ToSingle(rawX);
2269 float y = Convert.ToSingle(rawY); 2276 float y = Convert.ToSingle(rawY);
2270 float z = Convert.ToSingle(rawZ); 2277 float z = Convert.ToSingle(rawZ);
2271 veclist.Add(new Vector3(x, y, z)); 2278 veclist.Add(new Vector3(x, y, z));
2279 }
2272 } 2280 }
2273 2281
2274 return false; 2282 return false;
@@ -2281,9 +2289,6 @@ namespace OpenSim.Region.Framework.Scenes
2281 m_log.Error( 2289 m_log.Error(
2282 "[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ", 2290 "[AGENT INVENTORY]: Deserialization of xml failed when looking for CoalescedObject tag. Exception ",
2283 e); 2291 e);
2284
2285 bbox = Vector3.Zero;
2286 offsetHeight = 0;
2287 } 2292 }
2288 2293
2289 return true; 2294 return true;