History

remove unneeded lock around action-data in entity item. Actions now use a weak pointer to keep track of owner entity

Seth Alves committed 11 years ago

Commit 30be5151 parent 5ecc39b9 files · +25 −36Browse files

Showing the changes to libraries/physics/src/ObjectActionSpring.cpp (1 of 9 files). Show all

Unified · Split

libraries/physics/src/ObjectActionSpring.cpp+6−1
@@ -33,7 +33,12 @@ void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) { · 32 unmodified lines
3333 return;
3434 }
3535
36− void* physicsInfo = _ownerEntity->getPhysicsInfo();
36+ auto ownerEntity = _ownerEntity.lock();
37+ if (!ownerEntity) {
38+ return;
39+ }
40+
41+ void* physicsInfo = ownerEntity->getPhysicsInfo();
3742 if (!physicsInfo) {
3843 unlock();
3944 return;