FIx a potential bug when using _glUniform calls with an invalid location

This commit is contained in:
sam 2016-12-01 02:44:04 -08:00
parent 6342762fde
commit 3d29187156

View file

@ -41,7 +41,7 @@ public:
}
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];
auto found = mapping.find(srcLoc);
if (found == mapping.end()) {