Fixed potential crash if an attachment binding doesn't connect to an attachment. (#1373)

main
Qing Tao 5 years ago committed by GitHub
parent 62c70035f4
commit 7b0d2aac03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,6 +61,11 @@ namespace AZ
{
const PassAttachmentBinding& binding = m_attachmentBindings[slotIndex];
if (!binding.m_attachment)
{
continue;
}
// Handle the depth-stencil attachment. There should be only one.
if (binding.m_scopeAttachmentUsage == RHI::ScopeAttachmentUsage::DepthStencil)
{
@ -98,6 +103,10 @@ namespace AZ
{
continue;
}
if (!binding.m_attachment)
{
continue;
}
if (binding.m_scopeAttachmentUsage == RHI::ScopeAttachmentUsage::RenderTarget
|| binding.m_scopeAttachmentUsage == RHI::ScopeAttachmentUsage::DepthStencil)

Loading…
Cancel
Save