mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +00:00
Handle empty indices array without crashing
This commit is contained in:
@@ -893,7 +893,7 @@ namespace renderdocui.Windows
|
||||
Buffer.BlockCopy(rawidxs, 0, ret.Indices, 0, rawidxs.Length);
|
||||
}
|
||||
|
||||
uint minIndex = ret.Indices[0];
|
||||
uint minIndex = ret.Indices.Length > 0 ? ret.Indices[0] : 0;
|
||||
foreach (var i in ret.Indices)
|
||||
{
|
||||
if (input.IndexFormat.format.compByteWidth == 2 && i == UInt16.MaxValue)
|
||||
|
||||
Reference in New Issue
Block a user