Speculative fix for crash upload, make sure node index is valid

This commit is contained in:
baldurk
2015-02-12 21:38:30 +00:00
parent ce20926f20
commit 7eed980850
+1 -1
View File
@@ -281,7 +281,7 @@ namespace renderdocui.Windows
drawNode.Nodes[drawNode.Nodes.Count - 2].Tag = drawNode.Nodes.LastNode.Tag;
}
if ((double)drawNode.Nodes[i]["Duration"] > 0.0)
if (i < drawNode.Nodes.Count && (double)drawNode.Nodes[i]["Duration"] > 0.0)
drawNode["Duration"] = Math.Max(0.0, (double)drawNode["Duration"]) + (double)drawNode.Nodes[i]["Duration"];
}