Fix crash on CharacterController in prefab

This commit is contained in:
Wojtek Figat
2022-02-23 22:41:06 +01:00
parent 3a07d767fb
commit 6b84773190

View File

@@ -242,7 +242,7 @@ void CharacterController::CreateShape()
void CharacterController::UpdateBounds()
{
void* actor = PhysicsBackend::GetShapeActor(_shape);
void* actor = _shape ? PhysicsBackend::GetShapeActor(_shape) : nullptr;
if (actor)
PhysicsBackend::GetActorBounds(actor, _box);
else