|
|
@@ -875,7 +875,9 @@ struct PhysicsWorldImpl
|
|
|
const Quaternion rot = rotation(*begin_world);
|
|
|
const Vector3 pos = translation(*begin_world);
|
|
|
// http://www.bulletphysics.org/mediawiki-1.5.8/index.php/MotionStates
|
|
|
- _actor[ai].actor->getMotionState()->setWorldTransform(btTransform(to_btQuaternion(rot), to_btVector3(pos)));
|
|
|
+ btMotionState* ms = _actor[ai].actor->getMotionState();
|
|
|
+ if (ms)
|
|
|
+ ms->setWorldTransform(btTransform(to_btQuaternion(rot), to_btVector3(pos)));
|
|
|
}
|
|
|
}
|
|
|
|