Commit 1a5afc21 authored by Steve Lhomme's avatar Steve Lhomme

direct3d11: fix potential NULL dereference

parent e371100e
......@@ -2210,8 +2210,11 @@ static int Direct3D11CreateGenericResources(vout_display_t *vd)
hr = CompilePixelShader(vd, sys->d3dregion_format, TRANSFER_FUNC_SRGB, true, &sys->pSPUPixelShader);
if (FAILED(hr))
{
ID3D11PixelShader_Release(sys->picQuadPixelShader);
sys->picQuadPixelShader = NULL;
if (sys->picQuadPixelShader)
{
ID3D11PixelShader_Release(sys->picQuadPixelShader);
sys->picQuadPixelShader = NULL;
}
msg_Err(vd, "Failed to create the SPU pixel shader. (hr=0x%lX)", hr);
return VLC_EGENERIC;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment