Attempt a sanity check to ensure the Atom debug camera doesn't get an invalid aspect ratio (#4196)
Signed-off-by: nvsickle <nvsickle@amazon.com>
This commit is contained in:
committed by
GitHub
parent
9f5187b8bb
commit
1474cfdcbf
@@ -272,7 +272,10 @@ namespace AZ
|
||||
else if (m_componentConfig.m_target)
|
||||
{
|
||||
const auto& viewport = m_componentConfig.m_target->GetViewport();
|
||||
m_aspectRatio = viewport.m_maxX / viewport.m_maxY;
|
||||
if (viewport.m_maxX > 0.0f && viewport.m_maxY > 0.0f)
|
||||
{
|
||||
m_aspectRatio = viewport.m_maxX / viewport.m_maxY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user