From eaa8f236729814b5edd47a03d5b7e4a25092f044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Sun, 4 Jun 2017 15:45:03 +0200 Subject: [PATCH] [core] only bind uniforms that exist in the program --- src/mbgl/gl/uniform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp index 34a32aeee..bb3453b2d 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); }