Merge pull request #4745 from sethalves/dont-crash-on-null-sessionid

session id can be null.  don't crash
This commit is contained in:
Stephen Birarda 2015-05-01 20:08:52 -04:00
commit 8a3853f1d0

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;