mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Fixed jolt crash when exiting and no physics bodies is in the scene.
This commit is contained in:
@@ -440,8 +440,12 @@ namespace Nuake
|
||||
void DynamicWorld::Clear()
|
||||
{
|
||||
_stepCount = 0;
|
||||
_JoltBodyInterface->RemoveBodies((JPH::BodyID*)_registeredBodies.data(), _registeredBodies.size());
|
||||
_registeredBodies.clear();
|
||||
|
||||
if (_registeredBodies.size() > 0)
|
||||
{
|
||||
_JoltBodyInterface->RemoveBodies((JPH::BodyID*)_registeredBodies.data(), _registeredBodies.size());
|
||||
_registeredBodies.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user