aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index ee5e777..2e28a81 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -409,7 +409,11 @@ namespace OpenSim.Region.Physics.OdePlugin
409 // If the geometry is in the targetspace, remove it from the target space 409 // If the geometry is in the targetspace, remove it from the target space
410 if (d.SpaceQuery(((OdePrim)prim).m_targetSpace, ((OdePrim)prim).prim_geom)) 410 if (d.SpaceQuery(((OdePrim)prim).m_targetSpace, ((OdePrim)prim).prim_geom))
411 { 411 {
412 d.SpaceRemove(((OdePrim)prim).m_targetSpace, ((OdePrim)prim).prim_geom); 412 if (!(((OdePrim)prim).m_targetSpace.Equals(null)))
413 {
414 if (d.GeomIsSpace(((OdePrim)prim).m_targetSpace))
415 d.SpaceRemove(((OdePrim)prim).m_targetSpace, ((OdePrim)prim).prim_geom);
416 }
413 } 417 }
414 418
415 419
@@ -466,6 +470,7 @@ namespace OpenSim.Region.Physics.OdePlugin
466 if (!(sGeomIsIn.Equals(null))) 470 if (!(sGeomIsIn.Equals(null)))
467 { 471 {
468 if (sGeomIsIn != (IntPtr)0) 472 if (sGeomIsIn != (IntPtr)0)
473 if (d.GeomIsSpace(currentspace))
469 d.SpaceRemove(sGeomIsIn, geom); 474 d.SpaceRemove(sGeomIsIn, geom);
470 } 475 }
471 } 476 }