Fix incorrect null check that could crash with no VS bound

This commit is contained in:
baldurk
2015-01-26 19:55:42 +00:00
parent d41a285f4d
commit 7bf45d043b
+3 -3
View File
@@ -390,7 +390,7 @@ namespace renderdocui.Code
for (int i = 0; i < attrs.Length; i++)
{
int attrib = -1;
if (m_GL.m_VS.BindpointMapping != null && m_GL.m_VS.BindpointMapping != null)
if (m_GL.m_VS.BindpointMapping != null && m_GL.m_VS.ShaderDetails != null)
attrib = m_GL.m_VS.BindpointMapping.InputAttributes[i];
else
attrib = i;
@@ -406,8 +406,8 @@ namespace renderdocui.Code
if (!attrs[i].Enabled) continue;
ret[a].Name = String.Format("attr{0}", i);
if (m_GL.m_VS.BindpointMapping != null && m_GL.m_VS.BindpointMapping != null)
if (m_GL.m_VS.BindpointMapping != null && m_GL.m_VS.ShaderDetails != null)
{
int attrib = m_GL.m_VS.BindpointMapping.InputAttributes[i];