diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index acd6a6503..b037f7f09 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;