Commit a5217fb8 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

direct3d11: don't crash when exiting with an error

It happens when opening the D3D11 device fails
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e045b625
...@@ -605,8 +605,10 @@ static void Direct3D11Close(vout_display_t *vd) ...@@ -605,8 +605,10 @@ static void Direct3D11Close(vout_display_t *vd)
vout_display_sys_t *sys = vd->sys; vout_display_sys_t *sys = vd->sys;
Direct3D11DestroyResources(vd); Direct3D11DestroyResources(vd);
ID3D11DeviceContext_Release(sys->d3dcontext); if ( sys->d3dcontext )
ID3D11Device_Release(sys->d3ddevice); ID3D11DeviceContext_Release(sys->d3dcontext);
if ( sys->d3ddevice )
ID3D11Device_Release(sys->d3ddevice);
msg_Dbg(vd, "Direct3D11 device adapter closed"); msg_Dbg(vd, "Direct3D11 device adapter closed");
} }
......
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