From e2200026ca6ad31adac8f98281c71930d9445ab8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Thu, 26 Nov 2009 17:03:00 -0500 Subject: * Fixes a case of d.BodyEnable with IntPtr.Zero passed as the parameter in linkset where EnableBody was called and the body is immediately disabled. The previous functionality assumed that a body was received in EnableBody but.. in some cases, it wasn't. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 17552d2..9e9c36f 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -2099,7 +2099,10 @@ Console.WriteLine(" JointCreateFixed"); // Re creates body on size. // EnableBody also does setMass() enableBody(); - d.BodyEnable(Body); + if (Body != IntPtr.Zero) + { + d.BodyEnable(Body); + } } _parent_scene.geom_name_map[prim_geom] = oldname; -- cgit v1.1