session id can be null. don't crash

This commit is contained in:
Seth Alves 2015-05-01 14:56:03 -07:00
parent 2bf7387723
commit 560d89b38a

View file

@ -376,11 +376,14 @@ void PhysicsEngine::doOwnershipInfection(const btCollisionObject* objectA, const
auto nodeList = DependencyManager::get<NodeList>();
QUuid myNodeID = nodeList->getSessionUUID();
if (myNodeID.isNull()) {
return;
}
const btCollisionObject* characterCollisionObject =
_characterController ? _characterController->getCollisionObject() : NULL;
assert(!myNodeID.isNull());
ObjectMotionState* a = static_cast<ObjectMotionState*>(objectA->getUserPointer());
ObjectMotionState* b = static_cast<ObjectMotionState*>(objectB->getUserPointer());
EntityItem* entityA = a ? a->getEntity() : NULL;