vulkan: fix crash when using wrong uniform name

This commit is contained in:
niki
2023-10-09 20:12:13 +02:00
parent 88272c6855
commit 2749209fc7
+2 -1
View File
@@ -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