Clamp element size to avoid divide by 0

This commit is contained in:
baldurk
2024-07-15 16:44:23 +01:00
parent d5cc1cf626
commit c75f1a1499
@@ -731,9 +731,9 @@ void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D1
"elements).\n")
.arg(res.byteOffset)
.arg(res.byteOffset + res.byteSize)
.arg(res.byteSize / res.elementByteSize)
.arg(res.byteSize / qMax(1U, res.elementByteSize))
.arg(buf->length)
.arg(buf->length / res.elementByteSize);
.arg(buf->length / qMax(1U, res.elementByteSize));
viewdetails = true;
}