From 882d1c1256e7f8fa9d0414522b4dd776c0c9e652 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 16 Mar 2018 17:47:33 -0400 Subject: [PATCH] OGLShader: Ensure m_id and m_compute_program_id are always initialized Depending on which constructor is invoked, m_id or m_compute_program_id can end up in an uninitialized state. We should ensure that the object is completely initialized to something deterministic regardless of the constructor taken. --- Source/Core/VideoBackends/OGL/OGLShader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/OGLShader.h b/Source/Core/VideoBackends/OGL/OGLShader.h index 981c835cc1..e3036044f6 100644 --- a/Source/Core/VideoBackends/OGL/OGLShader.h +++ b/Source/Core/VideoBackends/OGL/OGLShader.h @@ -31,8 +31,8 @@ public: private: GLenum m_type; - GLuint m_id; - GLuint m_compute_program_id; + GLuint m_id = 0; + GLuint m_compute_program_id = 0; }; } // namespace OGL