Search up the parent heirarchy for a DockContent

* Fixes a crash debugging a shader that has embedded source available
  (i.e. compiled with D3DCOMPILE_DEBUG).
This commit is contained in:
baldurk
2017-08-06 09:58:30 +01:00
parent c8dd41cdef
commit b7795f562d
+13 -1
View File
@@ -580,7 +580,19 @@ namespace renderdocui.Windows
AddFileList();
if (trace != null || sel == null)
sel = (DockContent)m_DisassemblyView.Parent;
{
Control p = m_DisassemblyView.Parent;
while (p != null)
{
if (p is DockContent)
{
sel = (DockContent)p;
break;
}
p = p.Parent;
}
}
sel.Show();
}