]> git.sesse.net Git - movit/commitdiff
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 db449dd7084f412ef63551a04a823245f7a9eff1..39af866bafd317319f1284d5b7ab218466749db3 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++);