From 5055212063c831e109d94bc3487e111c37cef6b3 Mon Sep 17 00:00:00 2001 From: gal20 <71563441+gal20@users.noreply.github.com> Date: Sat, 14 Nov 2020 21:45:30 +0200 Subject: [PATCH] Update src/video_core/renderer_opengl/gl_shader_manager.cpp Co-authored-by: Marshall Mohror --- src/video_core/renderer_opengl/gl_shader_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index acd6a6503b..b037f7f09a 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp @@ -267,7 +267,8 @@ public: auto [iter, new_shader] = shader_cache.emplace(program, OGLShaderStage{separable}); OGLShaderStage& cached_shader = iter->second; if (new_shader) { - result.code = program; + result.emplace(); + result->code = program; cached_shader.Create(program.c_str(), ShaderType); } shader_map[key] = &cached_shader;