From: Steinar H. Gunderson Date: Tue, 21 Jan 2014 22:58:11 +0000 (+0100) Subject: Fix mis-feeing in the ResourcePool destructor. X-Git-Tag: 1.0~68 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=f270222986351338627231f5d082f884b5d08101 Fix mis-feeing in the ResourcePool destructor. --- diff --git a/resource_pool.cpp b/resource_pool.cpp index e9241fc..6eadd90 100644 --- a/resource_pool.cpp +++ b/resource_pool.cpp @@ -36,8 +36,7 @@ ResourcePool::~ResourcePool() for (list::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);