mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix crashes when loading 'image' logs
This commit is contained in:
@@ -632,7 +632,7 @@ namespace renderdocui.Windows.PipelineState
|
||||
else
|
||||
iaBytecode.Text = state.m_IA.LayoutName;
|
||||
|
||||
if (state.m_IA.Bytecode.DebugInfo != null && state.m_IA.Bytecode.DebugInfo.entryFunc.Length > 0)
|
||||
if (state.m_IA.Bytecode != null && state.m_IA.Bytecode.DebugInfo != null && state.m_IA.Bytecode.DebugInfo.entryFunc.Length > 0)
|
||||
iaBytecode.Text += " (" + state.m_IA.Bytecode.DebugInfo.entryFunc + ")";
|
||||
|
||||
iaBytecodeMismatch.Text = "";
|
||||
|
||||
@@ -600,28 +600,6 @@ namespace renderdocui.Windows
|
||||
|
||||
long fileSize = (new FileInfo(m_Core.LogFileName)).Length;
|
||||
|
||||
int firstIdx = 0;
|
||||
|
||||
var firstDrawcall = m_Core.CurDrawcalls[firstIdx];
|
||||
while (firstDrawcall.children != null && firstDrawcall.children.Length > 0)
|
||||
firstDrawcall = firstDrawcall.children[0];
|
||||
|
||||
while (firstDrawcall.events.Length == 0)
|
||||
{
|
||||
if (firstDrawcall.next != null)
|
||||
{
|
||||
firstDrawcall = firstDrawcall.next;
|
||||
while (firstDrawcall.children != null && firstDrawcall.children.Length > 0)
|
||||
firstDrawcall = firstDrawcall.children[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
firstDrawcall = m_Core.CurDrawcalls[++firstIdx];
|
||||
while (firstDrawcall.children != null && firstDrawcall.children.Length > 0)
|
||||
firstDrawcall = firstDrawcall.children[0];
|
||||
}
|
||||
}
|
||||
|
||||
var lastDraw = m_Core.CurDrawcalls[m_Core.CurDrawcalls.Length - 1];
|
||||
while (lastDraw.children != null && lastDraw.children.Length > 0)
|
||||
lastDraw = lastDraw.children[lastDraw.children.Length - 1];
|
||||
|
||||
Reference in New Issue
Block a user