]> git.sesse.net Git - movit/commitdiff
Fix mis-feeing in the ResourcePool destructor.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 21 Jan 2014 22:58:11 +0000 (23:58 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 21 Jan 2014 22:58:11 +0000 (23:58 +0100)
resource_pool.cpp

index e9241fc0d384f3981ce5ed8b8b8e2db04ef6e8be..6eadd9069538a473a7e419f2b60a27f1df331743 100644 (file)
@@ -36,8 +36,7 @@ ResourcePool::~ResourcePool()
        for (list<GLuint>::const_iterator freelist_it = texture_freelist.begin();
             freelist_it != texture_freelist.end();
             ++freelist_it) {
-               GLuint free_texture_num = program_freelist.front();
-               program_freelist.pop_front();
+               GLuint free_texture_num = *freelist_it;
                assert(texture_formats.count(free_texture_num) != 0);
                texture_freelist_bytes -= estimate_texture_size(texture_formats[free_texture_num]);
                texture_formats.erase(free_texture_num);