summaryrefslogtreecommitdiff
path: root/src/mbgl/gl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r--src/mbgl/gl/context.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index fbe7b39a6f..03b0e7abdb 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -61,10 +61,8 @@ void Context::setDirtyState() {
void Context::performCleanup() {
for (GLuint id : abandonedPrograms) {
- for (const auto& p : abandonedPrograms) {
- if (program == p) {
- program.setDirty();
- }
+ if (program == id) {
+ program.setDirty();
}
MBGL_CHECK_ERROR(glDeleteProgram(id));
}