mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:10:25 +02:00
FIx a potential bug when using _glUniform calls with an invalid location
This commit is contained in:
parent
6342762fde
commit
3d29187156
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
GLint getUniformLocation(GLint srcLoc, Version version = Mono) const {
|
GLint getUniformLocation(GLint srcLoc, Version version = Mono) const {
|
||||||
// THIS will be used in the future PR as we grow the number of versions
|
// This check protect against potential invalid src location for this shader, if unknown then return -1.
|
||||||
const auto& mapping = _uniformMappings[version];
|
const auto& mapping = _uniformMappings[version];
|
||||||
auto found = mapping.find(srcLoc);
|
auto found = mapping.find(srcLoc);
|
||||||
if (found == mapping.end()) {
|
if (found == mapping.end()) {
|
||||||
|
|
Loading…
Reference in a new issue