mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
0958b9db8e
commit
294b8d3c6e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue