dxgi: Avoid possible NULL pointer access in d3d11_swapchain_SetFullscreenState().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-07-09 15:25:54 +02:00 committed by Alexandre Julliard
parent 89b8f3d712
commit 80120d62eb
1 changed files with 3 additions and 4 deletions

View File

@ -252,12 +252,11 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
if (swapchain->target)
IDXGIOutput_Release(swapchain->target);
swapchain->target = target;
}
else
{
IDXGIOutput_Release(target);
return S_OK;
}
if (target)
IDXGIOutput_Release(target);
return hr;
}