Skip to content

Commit

Permalink
Change runtime error to the nullptr returning as we have correct null…
Browse files Browse the repository at this point in the history
…ptr handling for function callers
  • Loading branch information
TatyanaPolunina committed Feb 1, 2025
1 parent a51d6a4 commit e460550
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 e460550

Please sign in to comment.