Merge pull request #5497 from aws-lumberyard-dev/viewport/select_rect_fix

Fix attempted rendering of invalid Entity selection boxes.
This commit is contained in:
jonawals
2021-11-11 09:15:27 +00:00
committed by GitHub
@@ -1178,8 +1178,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();