[core] don't iterate too much over program objects scheduled for deletion

This commit is contained in:
Konstantin Käfer
2016-09-28 17:50:24 +02:00
parent 9a41b8abaf
commit 068732fc9e

View File

@@ -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));
}