Showing the changes to libraries/physics/src/ObjectMotionState.cpp (1 of 2 files). Show all
Unified · Split
| @@ -202,6 +202,7 @@ void ObjectMotionState::setShape(const btCollisionShape* shape) { · 201 unmodified lines | ||
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | void ObjectMotionState::handleEasyChanges(uint32_t& flags) { |
| 205 | + assert(_body && _shape); | |
| 205 | 206 | if (flags & Simulation::DIRTY_POSITION) { |
| 206 | 207 | btTransform worldTrans = _body->getWorldTransform(); |
| 207 | 208 | btVector3 newPosition = glmToBullet(getObjectPosition()); |
| @@ -282,6 +283,7 @@ void ObjectMotionState::handleEasyChanges(uint32_t& flags) { · 74 unmodified lines | ||
| 282 | 283 | } |
| 283 | 284 | |
| 284 | 285 | bool ObjectMotionState::handleHardAndEasyChanges(uint32_t& flags, PhysicsEngine* engine) { |
| 286 | + assert(_body && _shape); | |
| 285 | 287 | if (flags & Simulation::DIRTY_SHAPE) { |
| 286 | 288 | // make sure the new shape is valid |
| 287 | 289 | if (!isReadyToComputeShape()) { |