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 Jan 31, 2025
1 parent 90a6131 commit 3ce1b5a
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 3ce1b5a

Please sign in to comment.