From 5db5ac611a5cc2645d4c8638c640bc1c2372a6bd Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 28 Aug 2020 15:45:07 +0200 Subject: GPU: Fix Segmentation Fault Freeing Failed Shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CPP Shader class does not initialize the interface attribute. What will crash when deleting the shader. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8740 --- source/blender/gpu/intern/gpu_shader_private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh index 22de1a0f59e..d56a7b2500b 100644 --- a/source/blender/gpu/intern/gpu_shader_private.hh +++ b/source/blender/gpu/intern/gpu_shader_private.hh @@ -36,7 +36,7 @@ namespace gpu { class Shader { public: /** Uniform & attribute locations for shader. */ - ShaderInterface *interface; + ShaderInterface *interface = nullptr; protected: /** For debugging purpose. */ -- cgit v1.2.3