Handle empty indices array without crashing

This commit is contained in:
baldurk
2014-12-01 13:14:43 +00:00
parent 332cf73591
commit 49b2b2d2df
+1 -1
View File
@@ -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)