Fix crash when changing mesh collider in async for not-simulated actor

This commit is contained in:
Wojciech Figat
2021-11-16 20:59:57 +01:00
parent 13deb4a54f
commit 5447dc9e25
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ MeshCollider::MeshCollider(const SpawnParams& params)
void MeshCollider::OnCollisionDataChanged()
{
// This should not be called during physics simulation, if it happened use write lock on physx scene
ASSERT(!Physics::IsDuringSimulation());
ASSERT(!GetScene() || !Physics::IsDuringSimulation());
if (CollisionData)
{

View File

@@ -45,7 +45,7 @@ void SplineCollider::ExtractGeometry(Array<Vector3>& vertexBuffer, Array<int32>&
void SplineCollider::OnCollisionDataChanged()
{
// This should not be called during physics simulation, if it happened use write lock on physx scene
ASSERT(!Physics::IsDuringSimulation());
ASSERT(!GetScene() || !Physics::IsDuringSimulation());
if (CollisionData)
{