summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/d3d12/d3d12-device.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/gfx/d3d12/d3d12-device.cpp b/tools/gfx/d3d12/d3d12-device.cpp
index 44a9faa45..cd4dfb7a3 100644
--- a/tools/gfx/d3d12/d3d12-device.cpp
+++ b/tools/gfx/d3d12/d3d12-device.cpp
@@ -1899,6 +1899,7 @@ Result DeviceImpl::createInputLayout(IInputLayout::Desc const& desc, IInputLayou
char* textPos = layout->m_text.getBuffer();
List<D3D12_INPUT_ELEMENT_DESC>& elements = layout->m_elements;
+ SLANG_ASSERT(inputElementCount > 0);
elements.setCount(inputElementCount);
for (Int i = 0; i < inputElementCount; ++i)