Fix a tiny leak (that would cause an assertion failure on exit).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Mar 2014 15:18:12 +0000 (16:18 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Mar 2014 15:18:12 +0000 (16:18 +0100)
resource_pool.cpp

index a83add2..a32247d 100644 (file)
@@ -256,6 +256,7 @@ void ResourcePool::release_2d_texture(GLuint texture_num)
                        map<GLuint, FBO>::const_iterator format_it = fbo_formats.find(fbo_num);
                        assert(format_it != fbo_formats.end());
                        if (format_it->second.texture_num == free_texture_num) {
+                               fbo_formats.erase(fbo_num);
                                glDeleteFramebuffers(1, &fbo_num);
                                fbo_freelist.erase(fbo_freelist_it++);
                        } else {