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-13 12:21:50 -0700
commit978363a47f3c15aa4f3ac42bd63d5f65a4f827b0 (patch)
tree62a757e5dbf0114327abeb83baaadb2dc354e728
parent7f8f75b1c9d50fe02d0112717de5b4a79e1e44ce (diff)
downloadqtlocation-mapboxgl-978363a47f3c15aa4f3ac42bd63d5f65a4f827b0.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 b877f10e46..829192bcca 100644
--- a/src/mbgl/gl/uniform.hpp
+++ b/src/mbgl/gl/uniform.hpp
@@ -49,7 +49,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);
}