From c0f631dbdbac0ae2296fc2e1c013484ee0d32a1a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 2 Jun 2008 08:13:13 +0000 Subject: * While I couldn't reproduce it, I was able to see how it *might* happen, so therefore; fix to: 0001058: Physics crash when changing Type of Prim intersecting with ground. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 6ade638..507030b 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -882,8 +882,11 @@ namespace OpenSim.Region.Physics.OdePlugin } if (m_isphysical) { - d.BodySetLinearVel(Body, 0f, 0f, 0f); - enableBodySoft(); + if (Body != IntPtr.Zero) + { + d.BodySetLinearVel(Body, 0f, 0f, 0f); + enableBodySoft(); + } } } -- cgit v1.1