Make gfx::gltf_mesh return empty primitive span if mesh wasn't found
This commit is contained in:
parent
ce1809e50d
commit
0e84751ac9
1 changed files with 3 additions and 1 deletions
|
|
@ -45,7 +45,9 @@ namespace psemek::gfx
|
|||
|
||||
util::span<primitive const> mesh(std::string_view name) const override
|
||||
{
|
||||
return meshes_.at(name);
|
||||
if (auto it = meshes_.find(name); it != meshes_.end())
|
||||
return it->second;
|
||||
return {};
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue