Merge pull request #5608 from gal20/fix-flatpak-crash

Fix flatpak crash when hardware shader is enabled
This commit is contained in:
Marshall Mohror 2020-11-15 11:23:08 -06:00 committed by GitHub
commit 23b67849d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,6 +267,7 @@ public:
auto [iter, new_shader] = shader_cache.emplace(program, OGLShaderStage{separable}); auto [iter, new_shader] = shader_cache.emplace(program, OGLShaderStage{separable});
OGLShaderStage& cached_shader = iter->second; OGLShaderStage& cached_shader = iter->second;
if (new_shader) { if (new_shader) {
result.emplace();
result->code = program; result->code = program;
cached_shader.Create(program.c_str(), ShaderType); cached_shader.Create(program.c_str(), ShaderType);
} }