From 7bf45d043b1a09841f0ac4ef908e46928905cc27 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 26 Jan 2015 19:55:42 +0000 Subject: [PATCH] Fix incorrect null check that could crash with no VS bound --- renderdocui/Code/CommonPipelineState.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdocui/Code/CommonPipelineState.cs b/renderdocui/Code/CommonPipelineState.cs index fe37d6b07..892b42601 100644 --- a/renderdocui/Code/CommonPipelineState.cs +++ b/renderdocui/Code/CommonPipelineState.cs @@ -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];