Fix an unlikely leak on error.

This commit is contained in:
Unknown W. Brackets committed 2015-01-17 18:45:03 -08:00
1 parent fa84bb6948
commit 3fcf695159
2 files changed
+2

No files matched your search

+1
View File
@@ -1195,6 +1195,7 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s
textureCache_->ForgetLastTexture();
nvfb->fbo = fbo_create(nvfb->width, nvfb->height, 1, false, (FBOColorDepth)nvfb->colorDepth);
if (!(nvfb->fbo)) {
delete nvfb;
ERROR_LOG(SCEGE, "Error creating FBO! %i x %i", nvfb->renderWidth, nvfb->renderHeight);
return;
}