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
Родитель dcf02822c1
Коммит 83cacf3533
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -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();
}