ode does not like null refs

0.9.0-post-fixes
UbitUmarov 2017-07-16 02:55:39 +01:00
parent cd15de628d
commit 04b97be71e
1 changed files with 2 additions and 1 deletions

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