JoltPhysics3D: Fix crash when freeing compoites colliders

This commit is contained in:
SirLynix
2023-03-25 14:19:05 +01:00
committed by Jérôme Leclercq
parent b3595178a1
commit 2b0239b8f0
3 changed files with 22 additions and 3 deletions

View File

@@ -22,8 +22,9 @@ namespace Nz
template<typename T>
void JoltCollider3D::SetupShapeSettings(std::unique_ptr<T> shapeSettings)
{
assert(!m_shapeSettings);
shapeSettings->SetEmbedded(); // Call SetEmbedded on the template type to prevent compiler to resolve it outside of a file including Jolt
assert(!m_shapeSettings);
m_shapeSettings = std::move(shapeSettings);
}