gsdx: use old size of target if ds and rt is null

CID 146843 (#1 of 1): Dereference after null check (FORWARD_NULL)6. var_deref_model: Passing null pointer ds to GetSize, which dereferences it.
This commit is contained in:
Akash 2015-10-17 22:47:44 +05:30
parent 0958b9db8e
commit 294b8d3c6e
1 changed files with 1 additions and 1 deletions

View File

@ -1411,7 +1411,7 @@ void GSDeviceOGL::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVecto
}
GSVector2i size = rt ? rt->GetSize() : ds->GetSize();
GSVector2i size = rt ? rt->GetSize() : ds ? ds->GetSize() : GLState::viewport;
if(GLState::viewport != size)
{
GLState::viewport = size;