summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-06-04 15:45:03 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-06-14 11:13:43 -0700
commiteaa8f236729814b5edd47a03d5b7e4a25092f044 (patch)
treee08624f67c23f152b1899060896d49178fa76949
parent951f5997065d39597e2aad1e4586a11053d6fe1f (diff)
downloadqtlocation-mapboxgl-eaa8f236729814b5edd47a03d5b7e4a25092f044.tar.gz
[core] only bind uniforms that exist in the program
-rw-r--r--src/mbgl/gl/uniform.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp
index 34a32aeee9..bb3453b2d8 100644
--- a/src/mbgl/gl/uniform.hpp
+++ b/src/mbgl/gl/uniform.hpp
@@ -30,7 +30,7 @@ public:
class State {
public:
void operator=(const Value& value) {
- if (!current || *current != value.t) {
+ if (location >= 0 && (!current || *current != value.t)) {
current = value.t;
bindUniform(location, value.t);
}