diff options
-rw-r--r-- | src/mbgl/gl/context.cpp | 6 |
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)); } |