diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp index ade4beaa33..9e0c285001 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp @@ -578,15 +578,14 @@ namespace AZ { if (m_meshHandle.IsValid() && m_meshFeatureProcessor) { - Aabb aabb = m_meshFeatureProcessor->GetLocalAabb(m_meshHandle); + if (Aabb aabb = m_meshFeatureProcessor->GetLocalAabb(m_meshHandle); aabb.IsValid()) + { + aabb.MultiplyByScale(m_cachedNonUniformScale); + return aabb; + } + } - aabb.MultiplyByScale(m_cachedNonUniformScale); - return aabb; - } - else - { - return Aabb::CreateNull(); - } + return Aabb::CreateNull(); } AzFramework::RenderGeometry::RayResult MeshComponentController::RenderGeometryIntersect(