Fix an unlikely leak on error.

This commit is contained in:
Unknown W. Brackets 2015-01-17 18:45:03 -08:00
parent fa84bb6948
commit 3fcf695159
2 changed files with 2 additions and 0 deletions

View File

@ -876,6 +876,7 @@ namespace DX9 {
textureCache_->ForgetLastTexture();
nvfb->fbo = fbo_create(nvfb->width, nvfb->height, 1, true, (FBOColorDepth)nvfb->colorDepth);
if (!(nvfb->fbo)) {
delete nvfb;
ERROR_LOG(SCEGE, "Error creating FBO! %i x %i", nvfb->renderWidth, nvfb->renderHeight);
return;
}

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;
}