Bug 708136 - Don't teardown GL objects if teardown's makecurrent fails - r=bjacob

This commit is contained in:
Jeff Gilbert 2012-04-30 19:05:59 -07:00
parent 46073c5af4
commit 8fd1db572f

View File

@ -1748,13 +1748,16 @@ GLContext::MarkDestroyed()
if (IsDestroyed())
return;
MakeCurrent();
DeleteOffscreenFBOs();
if (MakeCurrent()) {
DeleteOffscreenFBOs();
fDeleteProgram(mBlitProgram);
mBlitProgram = 0;
fDeleteFramebuffers(1, &mBlitFramebuffer);
mBlitFramebuffer = 0;
fDeleteProgram(mBlitProgram);
mBlitProgram = 0;
fDeleteFramebuffers(1, &mBlitFramebuffer);
mBlitFramebuffer = 0;
} else {
NS_WARNING("MakeCurrent() failed during MarkDestroyed! Skipping GL object teardown.");
}
mSymbols.Zero();
}