Skip to content

Commit

Permalink
Change runtime error to the nullptr returning (#3184)
Browse files Browse the repository at this point in the history
  • Loading branch information
TatyanaPolunina authored Feb 3, 2025
1 parent d6b6f9e commit e7bca28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/mbgl/shaders/mtl/shader_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class ShaderGroup final : public ShaderGroupBase {
assert(shader);
if (!shader || !registerShader(shader, shaderName)) {
assert(false);
throw std::runtime_error("Failed to register " + shaderName + " with shader group!");
Log::Error(Event::Shader, "Failed to register " + shaderName + " with shader group!");
return nullptr;
}

using ShaderClass = shaders::ShaderSource<ShaderID, gfx::Backend::Type::Metal>;
Expand Down

0 comments on commit e7bca28

Please sign in to comment.