Showing the changes to libraries/physics/src/ObjectActionSpring.cpp (1 of 9 files). Show all
Unified · Split
| @@ -33,7 +33,12 @@ void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) { · 32 unmodified lines | ||
| 33 | 33 | return; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | − void* physicsInfo = _ownerEntity->getPhysicsInfo(); | |
| 36 | + auto ownerEntity = _ownerEntity.lock(); | |
| 37 | + if (!ownerEntity) { | |
| 38 | + return; | |
| 39 | + } | |
| 40 | + | |
| 41 | + void* physicsInfo = ownerEntity->getPhysicsInfo(); | |
| 37 | 42 | if (!physicsInfo) { |
| 38 | 43 | unlock(); |
| 39 | 44 | return; |