ode does not like null refs

This commit is contained in:
UbitUmarov
2017-07-16 02:55:39 +01:00
parent cd15de628d
commit 04b97be71e

View File

@@ -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();
}