Fixed potential crash if an attachment binding doesn't connect to an attachment. (#1373)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user