From 04b97be71e6e33214491ee9f6fcf94d3978f45f7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 16 Jul 2017 02:55:39 +0100 Subject: ode does not like null refs --- OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs index 44e722c..76ef88b 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs @@ -1043,7 +1043,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde d.BodySetLinearVel(Body, 0, 0, 0); // stop it d.BodySetAngularVel(Body, 0, 0, 0); } - d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); + if(prim_geom != IntPtr.Zero) + d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); disableBodySoft(); // stop collisions UnSubscribeEvents(); } -- cgit v1.1