Prevent NRE if you do a llSetStatus(STATUS_ROTATION...) on an object that isn't physical.

0.6.1-post-fixes
Homer Horwitz 2008-11-15 17:19:35 +00:00
parent 1f06532b82
commit 3fdc445dd1
1 changed files with 5 additions and 2 deletions

View File

@ -2335,8 +2335,11 @@ if (m_shape != null) {
public void SetPhysicsAxisRotation() public void SetPhysicsAxisRotation()
{ {
PhysActor.LockAngularMotion(RotationAxis); if (PhysActor != null)
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); {
PhysActor.LockAngularMotion(RotationAxis);
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
}
} }
public void SetScriptEvents(UUID scriptid, int events) public void SetScriptEvents(UUID scriptid, int events)