fixed a crash bug with certain cards that do not support stencil buffer. The crash would fail the display of the first frame. Example card, PowerVR kyro

This commit is contained in:
Asad M. Zaman 2003-09-12 21:55:47 +00:00
parent e3abfcffc3
commit 458d86dcbf
1 changed files with 4 additions and 2 deletions

View File

@ -4767,8 +4767,10 @@ void DXGraphicsStateGuardian8::set_render_target() {
_pD3DDevice->GetDepthStencilSurface(&pStencil);
_pD3DDevice->SetRenderTarget(pBack,pStencil);
pBack->Release();
pStencil->Release();
if (pBack)
pBack->Release();
if (pStencil)
pStencil->Release();
}
////////////////////////////////////////////////////////////////////