Fix an issue where we could take an FBO off a freelist but not properly clean fbo_for...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 12 Apr 2014 00:25:13 +0000 (02:25 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 12 Apr 2014 00:25:13 +0000 (02:25 +0200)
resource_pool.cpp

index db449dd..39af866 100644 (file)
@@ -401,6 +401,7 @@ void ResourcePool::cleanup_unlinked_fbos(void *context)
                pair<void *, GLuint> key(context, fbo_num);
                assert(fbo_formats.count(key) != 0);
                if (fbo_formats[key].texture_num == 0) {
+                       fbo_formats.erase(key);
                        glDeleteFramebuffers(1, &fbo_num);
                        check_error();
                        fbo_freelist[context].erase(freelist_it++);