mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
vulkan: fix crash when using wrong uniform name
This commit is contained in:
@@ -551,7 +551,8 @@ int Shader::getVertexAttributeIndex(const std::string &name)
|
||||
|
||||
const Shader::UniformInfo *Shader::getUniformInfo(const std::string &name) const
|
||||
{
|
||||
return &uniformInfos.at(name);
|
||||
const auto it = uniformInfos.find(name);
|
||||
return it != uniformInfos.end() ? &(it->second) : nullptr;
|
||||
}
|
||||
|
||||
const Shader::UniformInfo *Shader::getUniformInfo(BuiltinUniform builtin) const
|
||||
|
||||
Reference in New Issue
Block a user