Fix attempted rendering of invalid Entity selection boxes.

Signed-off-by: John <jonawals@amazon.com>
This commit is contained in:
John
2021-11-10 17:36:21 +00:00
parent adf3357176
commit 3ced915f8e
@@ -1177,8 +1177,10 @@ namespace AzToolsFramework
continue;
}
const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo);
debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax());
if (const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo); bound.IsValid())
{
debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax());
}
}
debugDisplay.DepthTestOn();