mirror of
https://github.com/overte-org/overte.git
synced 2025-08-17 05:12:41 +02:00
Merge pull request #4745 from sethalves/dont-crash-on-null-sessionid
session id can be null. don't crash
This commit is contained in:
commit
8a3853f1d0
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue